diff options
| author | Alan Mackenzie | 2010-06-20 16:17:05 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2010-06-20 16:17:05 +0000 |
| commit | 05c123e62c476cbb856417823af0ba7bb59fa0c7 (patch) | |
| tree | 3601a1396adf71eb76b2baeb1be5dcda44bb1629 /lisp | |
| parent | 52ab9bb27b2d91a4050762bbe34f05db3018f62f (diff) | |
| download | emacs-05c123e62c476cbb856417823af0ba7bb59fa0c7.tar.gz emacs-05c123e62c476cbb856417823af0ba7bb59fa0c7.zip | |
* progmodes/cc-mode.el (c-before-hack-hook): When the mode is set in file
local variables, set it first.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/progmodes/cc-mode.el | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3371fb45312..47763f3c705 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-06-20 Alan Mackenzie <acm@muc.de> | ||
| 2 | |||
| 3 | * progmodes/cc-mode.el (c-before-hack-hook): When the mode is set | ||
| 4 | in file local variables, set it first. | ||
| 5 | |||
| 1 | 2010-06-19 Glenn Morris <rgm@gnu.org> | 6 | 2010-06-19 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * descr-text.el (describe-char-unicode-data): Insert separating | 8 | * descr-text.el (describe-char-unicode-data): Insert separating |
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 2bfa2b7df9b..6b0d3f8b423 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el | |||
| @@ -662,8 +662,13 @@ They are set only when, respectively, the pseudo variables | |||
| 662 | 662 | ||
| 663 | This function is called from the hook `before-hack-local-variables-hook'." | 663 | This function is called from the hook `before-hack-local-variables-hook'." |
| 664 | (when c-buffer-is-cc-mode | 664 | (when c-buffer-is-cc-mode |
| 665 | (let ((stile (cdr (assq 'c-file-style file-local-variables-alist))) | 665 | (let ((mode-cons (assq 'mode file-local-variables-alist)) |
| 666 | (stile (cdr (assq 'c-file-style file-local-variables-alist))) | ||
| 666 | (offsets (cdr (assq 'c-file-offsets file-local-variables-alist)))) | 667 | (offsets (cdr (assq 'c-file-offsets file-local-variables-alist)))) |
| 668 | (when mode-cons | ||
| 669 | (hack-one-local-variable (car mode-cons) (cdr mode-cons)) | ||
| 670 | (setq file-local-variables-alist | ||
| 671 | (delq mode-cons file-local-variables-alist))) | ||
| 667 | (when stile | 672 | (when stile |
| 668 | (or (stringp stile) (error "c-file-style is not a string")) | 673 | (or (stringp stile) (error "c-file-style is not a string")) |
| 669 | (c-set-style stile)) | 674 | (c-set-style stile)) |