diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2008-08-11 21:38:04 +0000 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2008-08-11 21:38:04 +0000 |
commit | 14e10fb314f34f7c2c8dea912cd8632d2576cdbe (patch) | |
tree | 675520b9fd9df0e970c6fb934204b8198edf62da /lisp | |
parent | 6af408391375c9cb84699b487f51bb9556963837 (diff) | |
download | emacs-14e10fb314f34f7c2c8dea912cd8632d2576cdbe.tar.gz emacs-14e10fb314f34f7c2c8dea912cd8632d2576cdbe.tar.bz2 emacs-14e10fb314f34f7c2c8dea912cd8632d2576cdbe.zip |
(c-emacs-features): Check beginning-of-defun-raw instead of
beginning-of-defun, and avoid moving point during the test.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/progmodes/cc-defs.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el index d1a1a75f303..92ff4562b85 100644 --- a/lisp/progmodes/cc-defs.el +++ b/lisp/progmodes/cc-defs.el @@ -1440,13 +1440,14 @@ non-nil, a caret is prepended to invert the set." '1-bit) list))) - ;; In Emacs >= 23, beginning-of-defun will passes its parameter to - ;; beginning-of-defun-function. Assume end-of-defun does the same. + ;; In Emacs >= 23, beginning-of-defun-raw passes its argument to + ;; beginning-of-defun-function. Assume end-of-defun does likewise. (let ((beginning-of-defun-function (lambda (&optional arg) (not (eq arg nil))))) - (if (beginning-of-defun 1) - (setq list (cons 'argumentative-bod-function list)))) + (save-excursion + (if (beginning-of-defun-raw 1) + (setq list (cons 'argumentative-bod-function list))))) (let ((buf (generate-new-buffer " test")) parse-sexp-lookup-properties |