From: Alan Mackenzie Date: Tue, 5 Jan 2016 21:16:37 +0000 (+0000) Subject: Remove function wrongly on AWK Mode value of context fontification hook. X-Git-Tag: emacs-25.0.90~259 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7380990;p=emacs.git Remove function wrongly on AWK Mode value of context fontification hook. * lisp/progmodes/cc-langs.el (c-before-context-fontification-functions): swap order of entries so that awk's entry isn't superseded by the default. * lisp/progmodes/cc-mode.el (c-before-context-fl-expand-region): Correct to handle nil value of c-before-context-fontification-functions. --- diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index d7972b4ef83..08d84fbb625 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -531,8 +531,8 @@ When the mode is initialized, these functions are called with parameters \(point-min), \(point-max) and .") (c-lang-defconst c-before-context-fontification-functions - awk nil - t 'c-context-expand-fl-region) + t 'c-context-expand-fl-region + awk nil) ;; For documentation see the following c-lang-defvar of the same name. ;; The value here may be a list of functions or a single function. (c-lang-defvar c-before-context-fontification-functions diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index e5be0b53b12..644065911dd 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -1252,7 +1252,8 @@ Note that the style variables are always made local to the buffer." (save-restriction (widen) (save-excursion - (let ((new-beg beg) (new-end end) new-region) + (let ((new-beg beg) (new-end end) + (new-region (cons beg end))) (mapc (lambda (fn) (setq new-region (funcall fn new-beg new-end)) (setq new-beg (car new-region) new-end (cdr new-region)))