aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mackenzie2013-05-02 11:18:18 +0000
committerAlan Mackenzie2013-05-02 11:18:18 +0000
commit30cac1e0e41260293b7900f67422f8833aaba63f (patch)
tree65f8ca7ffed39b0b47294b235d84df830f2d1bb5
parent0922c475915b41089fffab68f7012a530fe456e1 (diff)
downloademacs-30cac1e0e41260293b7900f67422f8833aaba63f.tar.gz
emacs-30cac1e0e41260293b7900f67422f8833aaba63f.zip
Eliminate variable c-standard-font-lock-fontify-region-function.
* progmodes/cc-mode.el (c-standard-font-lock-fontify-region-function): Remove. (c-font-lock-fontify-region, c-after-font-lock-init): Adapt.
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/progmodes/cc-mode.el12
2 files changed, 10 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index be8329a856c..fd42c57c5c9 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12013-05-02 Alan Mackenzie <acm@muc.de>
2
3 Eliminate variable c-standard-font-lock-fontify-region-function.
4 * progmodes/cc-mode.el
5 (c-standard-font-lock-fontify-region-function): Remove.
6 (c-font-lock-fontify-region, c-after-font-lock-init): Adapt.
7
12013-05-01 Leo Liu <sdl.web@gmail.com> 82013-05-01 Leo Liu <sdl.web@gmail.com>
2 9
3 * progmodes/octave.el: Compatible with older emacs-24 releases. 10 * progmodes/octave.el: Compatible with older emacs-24 releases.
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index 17e80b8b25b..d7416ae86cf 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -1160,9 +1160,6 @@ Note that the style variables are always made local to the buffer."
1160 ;; `c-set-fl-decl-start' for the detailed functionality. 1160 ;; `c-set-fl-decl-start' for the detailed functionality.
1161 (cons (c-set-fl-decl-start beg) end)) 1161 (cons (c-set-fl-decl-start beg) end))
1162 1162
1163(defvar c-standard-font-lock-fontify-region-function nil
1164 "Standard value of `font-lock-fontify-region-function'")
1165
1166(defun c-font-lock-fontify-region (beg end &optional verbose) 1163(defun c-font-lock-fontify-region (beg end &optional verbose)
1167 ;; Effectively advice around `font-lock-fontify-region' which extends the 1164 ;; Effectively advice around `font-lock-fontify-region' which extends the
1168 ;; region (BEG END), for example, to avoid context fontification chopping 1165 ;; region (BEG END), for example, to avoid context fontification chopping
@@ -1187,17 +1184,14 @@ Note that the style variables are always made local to the buffer."
1187 (setq new-region (funcall fn new-beg new-end)) 1184 (setq new-region (funcall fn new-beg new-end))
1188 (setq new-beg (car new-region) new-end (cdr new-region))) 1185 (setq new-beg (car new-region) new-end (cdr new-region)))
1189 c-before-context-fontification-functions)))) 1186 c-before-context-fontification-functions))))
1190 (funcall c-standard-font-lock-fontify-region-function 1187 (funcall (default-value 'font-lock-fontify-region-function)
1191 new-beg new-end verbose))) 1188 new-beg new-end verbose)))
1192 1189
1193(defun c-after-font-lock-init () 1190(defun c-after-font-lock-init ()
1194 ;; Put on `font-lock-mode-hook'. This function ensures our after-change 1191 ;; Put on `font-lock-mode-hook'. This function ensures our after-change
1195 ;; function will get executed before the font-lock one. Amongst other 1192 ;; function will get executed before the font-lock one.
1196 ;; things.
1197 (remove-hook 'after-change-functions 'c-after-change t) 1193 (remove-hook 'after-change-functions 'c-after-change t)
1198 (add-hook 'after-change-functions 'c-after-change nil t) 1194 (add-hook 'after-change-functions 'c-after-change nil t))
1199 (setq c-standard-font-lock-fontify-region-function
1200 (default-value 'font-lock-fontify-region-function)))
1201 1195
1202(defun c-font-lock-init () 1196(defun c-font-lock-init ()
1203 "Set up the font-lock variables for using the font-lock support in CC Mode. 1197 "Set up the font-lock variables for using the font-lock support in CC Mode.