changeset 87320:80e1a8076c36

* progmodes/cc-vars.el (defcustom-c-stylevar): Eval VAL. (c-comment-continuation-stars): No longer declare with cc-bytecomp-obsolete-var and cc-bytecomp-defvar. (c-block-comment-prefix): Use symbol-value to access c-comment-continuation-stars. * progmodes/cc-mode.el (c-initialize-cc-mode): Use symbol-value to access c-comment-continuation-stars.
author Thien-Thi Nguyen <ttn@gnuvola.org>
date Tue, 18 Dec 2007 09:21:07 +0000
parents ac2e9c3d2b02
children 0c95db530576
files lisp/progmodes/cc-mode.el lisp/progmodes/cc-vars.el
diffstat 2 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/cc-mode.el	Tue Dec 18 08:25:34 2007 +0000
+++ b/lisp/progmodes/cc-mode.el	Tue Dec 18 09:21:07 2007 +0000
@@ -190,7 +190,8 @@
 	    (run-hooks 'c-initialization-hook)
 	    ;; Fix obsolete variables.
 	    (if (boundp 'c-comment-continuation-stars)
-		(setq c-block-comment-prefix c-comment-continuation-stars))
+		(setq c-block-comment-prefix
+		      (symbol-value 'c-comment-continuation-stars)))
 	    (add-hook 'change-major-mode-hook 'c-leave-cc-mode-mode)
 	    (setq c-initialization-ok t))
 	;; Will try initialization hooks again if they failed.
--- a/lisp/progmodes/cc-vars.el	Tue Dec 18 08:25:34 2007 +0000
+++ b/lisp/progmodes/cc-vars.el	Tue Dec 18 09:21:07 2007 +0000
@@ -183,7 +183,7 @@
          (newt (append (unless (plist-get tail :tag)
                          '(:tag "Override style settings"))
                        (unless (plist-get tail :value)
-                         `(:value ,val))
+                         `(:value ,(eval val)))
                        tail))
          (aggregate `'(radio
                        (const :tag "Use style settings" set-from-style)
@@ -440,12 +440,13 @@
 ;; Although c-comment-continuation-stars is obsolete, we look at it in
 ;; some places in CC Mode anyway, so make the compiler ignore it
 ;; during our compilation.
-(cc-bytecomp-obsolete-var c-comment-continuation-stars)
-(cc-bytecomp-defvar c-comment-continuation-stars)
+;; [This is unclean; better to use `symbol-value'. --ttn]
+;;(cc-bytecomp-obsolete-var c-comment-continuation-stars)
+;;(cc-bytecomp-defvar c-comment-continuation-stars)
 
 (defcustom-c-stylevar c-block-comment-prefix
   (if (boundp 'c-comment-continuation-stars)
-      c-comment-continuation-stars
+      (symbol-value 'c-comment-continuation-stars)
     "* ")
   "*Specifies the line prefix of continued C-style block comments.
 You should set this variable to the literal string that gets inserted