aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2008-08-11 21:38:04 +0000
committerChong Yidong2008-08-11 21:38:04 +0000
commit14e10fb314f34f7c2c8dea912cd8632d2576cdbe (patch)
tree675520b9fd9df0e970c6fb934204b8198edf62da
parent6af408391375c9cb84699b487f51bb9556963837 (diff)
downloademacs-14e10fb314f34f7c2c8dea912cd8632d2576cdbe.tar.gz
emacs-14e10fb314f34f7c2c8dea912cd8632d2576cdbe.zip
(c-emacs-features): Check beginning-of-defun-raw instead of
beginning-of-defun, and avoid moving point during the test.
-rw-r--r--lisp/progmodes/cc-defs.el9
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."
1440 '1-bit) 1440 '1-bit)
1441 list))) 1441 list)))
1442 1442
1443 ;; In Emacs >= 23, beginning-of-defun will passes its parameter to 1443 ;; In Emacs >= 23, beginning-of-defun-raw passes its argument to
1444 ;; beginning-of-defun-function. Assume end-of-defun does the same. 1444 ;; beginning-of-defun-function. Assume end-of-defun does likewise.
1445 (let ((beginning-of-defun-function 1445 (let ((beginning-of-defun-function
1446 (lambda (&optional arg) 1446 (lambda (&optional arg)
1447 (not (eq arg nil))))) 1447 (not (eq arg nil)))))
1448 (if (beginning-of-defun 1) 1448 (save-excursion
1449 (setq list (cons 'argumentative-bod-function list)))) 1449 (if (beginning-of-defun-raw 1)
1450 (setq list (cons 'argumentative-bod-function list)))))
1450 1451
1451 (let ((buf (generate-new-buffer " test")) 1452 (let ((buf (generate-new-buffer " test"))
1452 parse-sexp-lookup-properties 1453 parse-sexp-lookup-properties