[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/progmodes/cc-langs.el, v [EMACS_22_B
From: |
Alan Mackenzie |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/progmodes/cc-langs.el, v [EMACS_22_BASE] |
Date: |
Sat, 28 Jul 2007 11:45:56 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Branch: EMACS_22_BASE
Changes by: Alan Mackenzie <acmacm> 07/07/28 11:45:55
Index: cc-langs.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/progmodes/cc-langs.el,v
retrieving revision 1.47.2.1
retrieving revision 1.47.2.2
diff -u -b -r1.47.2.1 -r1.47.2.2
--- cc-langs.el 25 Jul 2007 04:29:38 -0000 1.47.2.1
+++ cc-langs.el 28 Jul 2007 11:45:55 -0000 1.47.2.2
@@ -2875,6 +2875,14 @@
(defconst c-lang-variable-inits (cc-eval-when-compile c-lang-variable-inits))
(defconst c-emacs-variable-inits (cc-eval-when-compile c-emacs-variable-inits))
+;; Make the `c-lang-setvar' variables buffer local in the current buffer.
+;; These are typically standard emacs variables such as `comment-start'.
+(defmacro c-make-emacs-variables-local ()
+ `(progn
+ ,@(mapcar (lambda (init)
+ `(make-local-variable ',(car init)))
+ (cdr c-emacs-variable-inits))))
+
(defun c-make-init-lang-vars-fun (mode)
"Create a function that initializes all the language dependent variables
for the given mode.
@@ -2898,6 +2906,7 @@
;; that could be in the result from `cl-macroexpand-all'.
(let ((c-buffer-is-cc-mode ',mode)
current-var source-eval)
+ (c-make-emacs-variables-local)
(condition-case err
(if (eq c-version-sym ',c-version-sym)
@@ -2956,6 +2965,7 @@
(init (append (cdr c-emacs-variable-inits)
(cdr c-lang-variable-inits)))
current-var)
+ (c-make-emacs-variables-local)
(condition-case err
(while init