From 73809908c6520208df274dfbdf10e2fa87dc2064 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Tue, 5 Jan 2016 21:16:37 +0000 Subject: [PATCH] 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. --- lisp/progmodes/cc-langs.el | 4 ++-- lisp/progmodes/cc-mode.el | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) 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))) -- 2.39.2