comparison lisp/progmodes/cc-awk.el @ 77081:e8bd3e011b64

Changes to make `narrow-to-defun' and `mark-defun' work properly in CC Mode: cc-defs.el (c-beginning-of-defun-1): cc-cmds.el (c-beginning-of-defun, c-end-of-defun): bind beginning/end-of-defun-function to nil around calls to beginning/end-of-defun. cc-langs.el (beginning-of-defun-function, end-of-defun-function): new c-lang-setvar's. cc-awk.el (c-awk-beginning-of-defun): Add "(or arg (setq arg 1))" to enable non-interactive call.
author Alan Mackenzie <acm@muc.de>
date Mon, 09 Apr 2007 10:51:29 +0000
parents e3694f1cb928
children c1ec1c8a8d2e 4ef881a120fe
comparison
equal deleted inserted replaced
77080:32c1980a1285 77081:e8bd3e011b64
986 nor helpful. 986 nor helpful.
987 987
988 Note that this function might do hidden buffer changes. See the 988 Note that this function might do hidden buffer changes. See the
989 comment at the start of cc-engine.el for more info." 989 comment at the start of cc-engine.el for more info."
990 (interactive "p") 990 (interactive "p")
991 (or arg (setq arg 1))
991 (save-match-data 992 (save-match-data
992 (c-save-buffer-state ; ensures the buffer is writable. 993 (c-save-buffer-state ; ensures the buffer is writable.
993 nil 994 nil
994 (let ((found t)) ; Has the most recent regexp search found b-of-defun? 995 (let ((found t)) ; Has the most recent regexp search found b-of-defun?
995 (if (>= arg 0) 996 (if (>= arg 0)