emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r112439: Eliminate variable c-standar


From: Alan Mackenzie
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r112439: Eliminate variable c-standard-font-lock-fontify-region-function.
Date: Thu, 02 May 2013 11:18:18 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 112439
committer: Alan Mackenzie <address@hidden>
branch nick: trunk
timestamp: Thu 2013-05-02 11:18:18 +0000
message:
          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.
modified:
  lisp/ChangeLog
  lisp/progmodes/cc-mode.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-05-01 17:25:03 +0000
+++ b/lisp/ChangeLog    2013-05-02 11:18:18 +0000
@@ -1,3 +1,10 @@
+2013-05-02  Alan Mackenzie  <address@hidden>
+
+       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.
+
 2013-05-01  Leo Liu  <address@hidden>
 
        * progmodes/octave.el: Compatible with older emacs-24 releases.

=== modified file 'lisp/progmodes/cc-mode.el'
--- a/lisp/progmodes/cc-mode.el 2013-04-15 16:10:24 +0000
+++ b/lisp/progmodes/cc-mode.el 2013-05-02 11:18:18 +0000
@@ -1160,9 +1160,6 @@
   ;; `c-set-fl-decl-start' for the detailed functionality.
   (cons (c-set-fl-decl-start beg) end))
 
-(defvar c-standard-font-lock-fontify-region-function nil
-  "Standard value of `font-lock-fontify-region-function'")
-
 (defun c-font-lock-fontify-region (beg end &optional verbose)
   ;; Effectively advice around `font-lock-fontify-region' which extends the
   ;; region (BEG END), for example, to avoid context fontification chopping
@@ -1187,17 +1184,14 @@
                  (setq new-region (funcall fn new-beg new-end))
                  (setq new-beg (car new-region)  new-end (cdr new-region)))
                c-before-context-fontification-functions))))
-    (funcall c-standard-font-lock-fontify-region-function
+    (funcall (default-value 'font-lock-fontify-region-function)
             new-beg new-end verbose)))
 
 (defun c-after-font-lock-init ()
   ;; Put on `font-lock-mode-hook'.  This function ensures our after-change
-  ;; function will get executed before the font-lock one.  Amongst other
-  ;; things.
+  ;; function will get executed before the font-lock one.
   (remove-hook 'after-change-functions 'c-after-change t)
-  (add-hook 'after-change-functions 'c-after-change nil t)
-  (setq c-standard-font-lock-fontify-region-function
-       (default-value 'font-lock-fontify-region-function)))
+  (add-hook 'after-change-functions 'c-after-change nil t))
 
 (defun c-font-lock-init ()
   "Set up the font-lock variables for using the font-lock support in CC Mode.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]