Mercurial > emacs
changeset 97430:d76aacb7f6e4
(c-emacs-features): Check beginning-of-defun-raw instead of
beginning-of-defun, and avoid moving point during the test.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Mon, 11 Aug 2008 21:38:04 +0000 |
parents | 53dca1f0eeef |
children | 02fedff190ed |
files | lisp/progmodes/cc-defs.el |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/cc-defs.el Mon Aug 11 21:37:52 2008 +0000 +++ b/lisp/progmodes/cc-defs.el Mon Aug 11 21:38:04 2008 +0000 @@ -1440,13 +1440,14 @@ '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