Don't use defvaralias.
authorKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 25 Aug 2003 03:52:07 +0000 (03:52 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 25 Aug 2003 03:52:07 +0000 (03:52 +0000)
(gnus-treat-display-x-face): Warn if the obsolete variable
 `gnus-treat-display-xface' exists.

lisp/ChangeLog
lisp/gnus-art.el

index 74f407e..64369a0 100644 (file)
@@ -1,3 +1,9 @@
+2003-08-25  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-art.el: Don't use defvaralias.
+       (gnus-treat-display-x-face): Warn if the obsolete variable
+       `gnus-treat-display-xface' exists.
+
 2003-08-25  Jesper Harder  <harder@ifa.au.dk>
 
        * gnus-art.el (gnus-treat-display-face): Fix typo.
index 74d22eb..509c7d9 100644 (file)
@@ -1145,8 +1145,7 @@ See Info node `(gnus)Customizing Articles' for details."
   :type gnus-article-treat-custom)
 (put 'gnus-treat-overstrike 'highlight t)
 
-(defvaralias 'gnus-treat-display-xface 'gnus-treat-display-x-face)
-(make-obsolete-variable 'gnus-treat-display-xface 
+(make-obsolete-variable 'gnus-treat-display-xface
                        'gnus-treat-display-x-face)
 
 (defcustom gnus-treat-display-x-face
@@ -1166,7 +1165,22 @@ See Info node `(gnus)Customizing Articles' and Info node
   :version "21.1"
   :link '(custom-manual "(gnus)Customizing Articles")
   :link '(custom-manual "(gnus)X-Face")
-  :type gnus-article-treat-head-custom)
+  :type gnus-article-treat-head-custom
+  :set (lambda (symbol value)
+        (custom-set-default
+         symbol
+         (cond ((boundp 'gnus-treat-display-xface)
+                (message "\
+** gnus-treat-display-xface is an obsolete variable;\
+ use gnus-treat-display-x-face instead")
+                (default-value 'gnus-treat-display-xface))
+               ((get 'gnus-treat-display-xface 'saved-value)
+                (message "\
+** gnus-treat-display-xface is an obsolete variable;\
+ use gnus-treat-display-x-face instead")
+                (eval (car (get 'gnus-treat-display-xface 'saved-value))))
+               (t
+                value)))))
 (put 'gnus-treat-display-x-face 'highlight t)
 
 (defcustom gnus-treat-display-face