1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-31 04:41:23 -08:00

* progmodes/cc-mode.el (c-before-hack-hook): When the mode is set in file

local variables, set it first.
This commit is contained in:
Alan Mackenzie 2010-06-20 16:17:05 +00:00
parent 52ab9bb27b
commit 05c123e62c
2 changed files with 11 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2010-06-20 Alan Mackenzie <acm@muc.de>
* progmodes/cc-mode.el (c-before-hack-hook): When the mode is set
in file local variables, set it first.
2010-06-19 Glenn Morris <rgm@gnu.org>
* descr-text.el (describe-char-unicode-data): Insert separating

View file

@ -662,8 +662,13 @@ They are set only when, respectively, the pseudo variables
This function is called from the hook `before-hack-local-variables-hook'."
(when c-buffer-is-cc-mode
(let ((stile (cdr (assq 'c-file-style file-local-variables-alist)))
(let ((mode-cons (assq 'mode file-local-variables-alist))
(stile (cdr (assq 'c-file-style file-local-variables-alist)))
(offsets (cdr (assq 'c-file-offsets file-local-variables-alist))))
(when mode-cons
(hack-one-local-variable (car mode-cons) (cdr mode-cons))
(setq file-local-variables-alist
(delq mode-cons file-local-variables-alist)))
(when stile
(or (stringp stile) (error "c-file-style is not a string"))
(c-set-style stile))