aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mackenzie2008-06-27 21:12:46 +0000
committerAlan Mackenzie2008-06-27 21:12:46 +0000
commit13ac2398ff34ce51d1f3b7cafa2aea9af99cf203 (patch)
tree8187b144e2d1dca839b732facd2da7e1f2819682
parent2a79117ef584d4d01254a7fd311a755984f728b6 (diff)
downloademacs-13ac2398ff34ce51d1f3b7cafa2aea9af99cf203.tar.gz
emacs-13ac2398ff34ce51d1f3b7cafa2aea9af99cf203.zip
cc-mode.el (c-mode-base-map): Don't bind C-M-[ae] to the CC Mode specific
functions; this is no longer needed, since {beginning,end}-of-defun now pass ARG to ...-of-defun-function. cc-defs.el (c-emacs-features): new feature 'argumentative-bod-function. ---------------------------------------------------------------------- cc-defs.el cc-mode.el CVS: ----------------------------------------------------------------------
-rw-r--r--lisp/progmodes/cc-defs.el11
-rw-r--r--lisp/progmodes/cc-mode.el5
2 files changed, 14 insertions, 2 deletions
diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el
index dcdcdaec728..d1a1a75f303 100644
--- a/lisp/progmodes/cc-defs.el
+++ b/lisp/progmodes/cc-defs.el
@@ -1440,6 +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
1444 ;; beginning-of-defun-function. Assume end-of-defun does the same.
1445 (let ((beginning-of-defun-function
1446 (lambda (&optional arg)
1447 (not (eq arg nil)))))
1448 (if (beginning-of-defun 1)
1449 (setq list (cons 'argumentative-bod-function list))))
1450
1443 (let ((buf (generate-new-buffer " test")) 1451 (let ((buf (generate-new-buffer " test"))
1444 parse-sexp-lookup-properties 1452 parse-sexp-lookup-properties
1445 parse-sexp-ignore-comments 1453 parse-sexp-ignore-comments
@@ -1539,6 +1547,9 @@ might be present:
1539 1547
1540'8-bit 8 bit syntax entry flags (XEmacs style). 1548'8-bit 8 bit syntax entry flags (XEmacs style).
1541'1-bit 1 bit syntax entry flags (Emacs style). 1549'1-bit 1 bit syntax entry flags (Emacs style).
1550'argumentative-bod-function beginning-of-defun passes ARG through
1551 to a non-null beginning-of-defun-function. It is assumed
1552 the end-of-defun does the same thing.
1542'syntax-properties It works to override the syntax for specific characters 1553'syntax-properties It works to override the syntax for specific characters
1543 in the buffer with the 'syntax-table property. It's 1554 in the buffer with the 'syntax-table property. It's
1544 always set - CC Mode no longer works in emacsen without 1555 always set - CC Mode no longer works in emacsen without
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index 9076491db34..747b35be00a 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -285,8 +285,9 @@ control). See \"cc-mode.el\" for more info."
285 285
286 ;; RMS says don't make these the default. 286 ;; RMS says don't make these the default.
287 ;; (April 2006): RMS has now approved these commands as defaults. 287 ;; (April 2006): RMS has now approved these commands as defaults.
288 (define-key c-mode-base-map "\e\C-a" 'c-beginning-of-defun) 288 (unless (memq 'argumentative-bod-function c-emacs-features)
289 (define-key c-mode-base-map "\e\C-e" 'c-end-of-defun) 289 (define-key c-mode-base-map "\e\C-a" 'c-beginning-of-defun)
290 (define-key c-mode-base-map "\e\C-e" 'c-end-of-defun))
290 291
291 (define-key c-mode-base-map "\C-c\C-n" 'c-forward-conditional) 292 (define-key c-mode-base-map "\C-c\C-n" 'c-forward-conditional)
292 (define-key c-mode-base-map "\C-c\C-p" 'c-backward-conditional) 293 (define-key c-mode-base-map "\C-c\C-p" 'c-backward-conditional)