Mercurial > emacs
diff lisp/progmodes/cc-mode.el @ 107086:1786f2e6a856
Change strategy for marking < and > as template delimiters: mark them
strictly in matching pairs.
author | Alan Mackenzie <acm@muc.de> |
---|---|
date | Thu, 04 Feb 2010 21:15:37 +0000 |
parents | 1d1d5d9bd884 |
children | 17f07853dd4d |
line wrap: on
line diff
--- a/lisp/progmodes/cc-mode.el Thu Feb 04 17:25:57 2010 +0100 +++ b/lisp/progmodes/cc-mode.el Thu Feb 04 21:15:37 2010 +0000 @@ -641,8 +641,10 @@ (save-restriction (widen) (save-excursion - (if c-get-state-before-change-function - (funcall c-get-state-before-change-function (point-min) (point-max))) + (if c-get-state-before-change-functions + (mapc (lambda (fn) + (funcall fn beg end)) + c-get-state-before-change-functions)) (if c-before-font-lock-function (funcall c-before-font-lock-function (point-min) (point-max) (- (point-max) (point-min)))))) @@ -775,7 +777,7 @@ (defmacro c-run-mode-hooks (&rest hooks) ;; Emacs 21.1 has introduced a system with delayed mode hooks that - ;; require the use of the new function `run-mode-hooks'. + ;; requires the use of the new function `run-mode-hooks'. (if (cc-bytecomp-fboundp 'run-mode-hooks) `(run-mode-hooks ,@hooks) `(progn ,@(mapcar (lambda (hook) `(run-hooks ,hook)) hooks)))) @@ -808,8 +810,8 @@ ;; has already been widened, and match-data saved. The return value is ;; meaningless. ;; - ;; This function is the C/C++/ObjC value of - ;; `c-get-state-before-change-function' and is called exclusively as a + ;; This function is in the C/C++/ObjC values of + ;; `c-get-state-before-change-functions' and is called exclusively as a ;; before change function. (goto-char beg) (c-beginning-of-macro) @@ -922,8 +924,8 @@ ))))) (defun c-before-change (beg end) - ;; Function to be put on `before-change-function'. Primarily, this calls - ;; the language dependent `c-get-state-before-change-function'. It is + ;; Function to be put on `before-change-functions'. Primarily, this calls + ;; the language dependent `c-get-state-before-change-functions'. It is ;; otherwise used only to remove stale entries from the `c-found-types' ;; cache, and to record entries which a `c-after-change' function might ;; confirm as stale. @@ -1001,8 +1003,10 @@ ;; larger than (beg end). (setq c-new-BEG beg c-new-END end) - (if c-get-state-before-change-function - (funcall c-get-state-before-change-function beg end)) + (if c-get-state-before-change-functions + (mapc (lambda (fn) + (funcall fn beg end)) + c-get-state-before-change-functions)) )))) (defun c-after-change (beg end old-len)