[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/emacs-23 r99869: * progmodes/cc-mode.el (c-
From: |
Alan Mackenzie |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/emacs-23 r99869: * progmodes/cc-mode.el (c-before-hack-hook): When the mode is set in file |
Date: |
Sun, 20 Jun 2010 16:17:05 +0000 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 99869
committer: Alan Mackenzie <address@hidden>
branch nick: emacs-23
timestamp: Sun 2010-06-20 16:17:05 +0000
message:
* progmodes/cc-mode.el (c-before-hack-hook): When the mode is set in file
local variables, set it first.
modified:
lisp/ChangeLog
lisp/progmodes/cc-mode.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-06-19 02:31:44 +0000
+++ b/lisp/ChangeLog 2010-06-20 16:17:05 +0000
@@ -1,3 +1,8 @@
+2010-06-20 Alan Mackenzie <address@hidden>
+
+ * 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 <address@hidden>
* descr-text.el (describe-char-unicode-data): Insert separating
=== modified file 'lisp/progmodes/cc-mode.el'
--- a/lisp/progmodes/cc-mode.el 2010-04-12 18:58:52 +0000
+++ b/lisp/progmodes/cc-mode.el 2010-06-20 16:17:05 +0000
@@ -662,8 +662,13 @@
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))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/emacs-23 r99869: * progmodes/cc-mode.el (c-before-hack-hook): When the mode is set in file,
Alan Mackenzie <=