aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/progmodes/cc-mode.el7
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 @@
12010-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
12010-06-19 Glenn Morris <rgm@gnu.org> 62010-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
663This function is called from the hook `before-hack-local-variables-hook'." 663This 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))