diff options
| author | Alan Mackenzie | 2016-01-05 21:16:37 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2016-01-05 21:16:37 +0000 |
| commit | 73809908c6520208df274dfbdf10e2fa87dc2064 (patch) | |
| tree | 35e5df9e10037a3f84085c9fc83e59b99e382779 | |
| parent | d400753a0d1c4080c6c2addf6d0be4660e076c75 (diff) | |
| download | emacs-73809908c6520208df274dfbdf10e2fa87dc2064.tar.gz emacs-73809908c6520208df274dfbdf10e2fa87dc2064.zip | |
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.
| -rw-r--r-- | lisp/progmodes/cc-langs.el | 4 | ||||
| -rw-r--r-- | 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 | |||
| 531 | parameters \(point-min), \(point-max) and <buffer size>.") | 531 | parameters \(point-min), \(point-max) and <buffer size>.") |
| 532 | 532 | ||
| 533 | (c-lang-defconst c-before-context-fontification-functions | 533 | (c-lang-defconst c-before-context-fontification-functions |
| 534 | awk nil | 534 | t 'c-context-expand-fl-region |
| 535 | t 'c-context-expand-fl-region) | 535 | awk nil) |
| 536 | ;; For documentation see the following c-lang-defvar of the same name. | 536 | ;; For documentation see the following c-lang-defvar of the same name. |
| 537 | ;; The value here may be a list of functions or a single function. | 537 | ;; The value here may be a list of functions or a single function. |
| 538 | (c-lang-defvar c-before-context-fontification-functions | 538 | (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." | |||
| 1252 | (save-restriction | 1252 | (save-restriction |
| 1253 | (widen) | 1253 | (widen) |
| 1254 | (save-excursion | 1254 | (save-excursion |
| 1255 | (let ((new-beg beg) (new-end end) new-region) | 1255 | (let ((new-beg beg) (new-end end) |
| 1256 | (new-region (cons beg end))) | ||
| 1256 | (mapc (lambda (fn) | 1257 | (mapc (lambda (fn) |
| 1257 | (setq new-region (funcall fn new-beg new-end)) | 1258 | (setq new-region (funcall fn new-beg new-end)) |
| 1258 | (setq new-beg (car new-region) new-end (cdr new-region))) | 1259 | (setq new-beg (car new-region) new-end (cdr new-region))) |