emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/progmodes/cc-langs.el,v


From: Alan Mackenzie
Subject: [Emacs-diffs] Changes to emacs/lisp/progmodes/cc-langs.el,v
Date: Sat, 28 Jul 2007 11:51:39 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Alan Mackenzie <acmacm> 07/07/28 11:51:39

Index: cc-langs.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/progmodes/cc-langs.el,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -b -r1.48 -r1.49
--- cc-langs.el 26 Jul 2007 05:27:24 -0000      1.48
+++ cc-langs.el 28 Jul 2007 11:51:38 -0000      1.49
@@ -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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]