emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/cus-edit.el


From: Chong Yidong
Subject: [Emacs-diffs] Changes to emacs/lisp/cus-edit.el
Date: Sat, 24 Dec 2005 06:45:17 +0000

Index: emacs/lisp/cus-edit.el
diff -u emacs/lisp/cus-edit.el:1.257 emacs/lisp/cus-edit.el:1.258
--- emacs/lisp/cus-edit.el:1.257        Sat Dec 24 04:05:13 2005
+++ emacs/lisp/cus-edit.el      Sat Dec 24 06:45:15 2005
@@ -2545,12 +2545,15 @@
                             (error nil))
                           'set
                         'changed))
-                     ((progn (setq tmp (get symbol 'saved-value))
+                     ((progn (setq tmp (get symbol 'theme-value))
                              (setq temp (get symbol 'saved-variable-comment))
                              (or tmp temp))
                       (if (condition-case nil
-                              (and (equal value (eval (car tmp)))
-                                   (equal comment temp))
+                              (and (equal comment temp)
+                                   (equal value
+                                          (eval (car
+                                                 (custom-theme-value
+                                                  (caar tmp) tmp)))))
                             (error nil))
                           (cond
                            ((eq 'user (caar (get symbol 'theme-value)))
@@ -2666,6 +2669,8 @@
             ;; Make the comment invisible by hand if it's empty
             (custom-comment-hide comment-widget))
           (custom-variable-backup-value widget)
+          (custom-push-theme 'theme-value symbol 'user
+                             'set (widget-value child))
           (funcall set symbol (eval (setq val (widget-value child))))
           (put symbol 'customized-value (list val))
           (put symbol 'variable-comment comment)
@@ -2676,6 +2681,8 @@
             ;; Make the comment invisible by hand if it's empty
             (custom-comment-hide comment-widget))
           (custom-variable-backup-value widget)
+          (custom-push-theme 'theme-value symbol 'user
+                             'set (widget-value child))
           (funcall set symbol (setq val (widget-value child)))
           (put symbol 'customized-value (list (custom-quote val)))
           (put symbol 'variable-comment comment)
@@ -2705,7 +2712,7 @@
             (custom-comment-hide comment-widget))
           (put symbol 'saved-value (list (widget-value child)))
           (custom-push-theme 'theme-value symbol 'user
-                             'set (list (widget-value child)))
+                             'set (widget-value child))
           (funcall set symbol (eval (widget-value child)))
           (put symbol 'variable-comment comment)
           (put symbol 'saved-variable-comment comment))
@@ -2717,8 +2724,8 @@
           (put symbol 'saved-value
                (list (custom-quote (widget-value child))))
           (custom-push-theme 'theme-value symbol 'user
-                             'set (list (custom-quote (widget-value
-                                                 child))))
+                             'set (custom-quote (widget-value
+                                                 child)))
           (funcall set symbol (widget-value child))
           (put symbol 'variable-comment comment)
           (put symbol 'saved-variable-comment comment)))
@@ -2739,6 +2746,7 @@
     (cond ((or value comment)
           (put symbol 'variable-comment comment)
           (custom-variable-backup-value widget)
+          (custom-push-theme 'theme-value symbol 'user 'set value)
           (condition-case nil
               (funcall set symbol (eval (car value)))
             (error nil)))
@@ -2759,17 +2767,15 @@
   (let* ((symbol (widget-value widget))
         (set (or (get symbol 'custom-set) 'set-default)))
     (if (get symbol 'standard-value)
-       (progn
-         (custom-variable-backup-value widget)
-         (funcall set symbol (eval (car (get symbol 'standard-value)))))
+       (custom-variable-backup-value widget)
       (error "No standard setting known for %S" symbol))
     (put symbol 'variable-comment nil)
     (put symbol 'customized-value nil)
     (put symbol 'customized-variable-comment nil)
+    (custom-push-theme 'theme-value symbol 'user 'reset nil)
+    (custom-theme-recalc-variable symbol)
     (when (or (get symbol 'saved-value) (get symbol 'saved-variable-comment))
       (put symbol 'saved-value nil)
-      (custom-push-theme 'theme-value symbol 'user 'reset nil)
-      (custom-theme-recalc-variable symbol)
       (put symbol 'saved-variable-comment nil)
       (custom-save-all))
     (widget-put widget :custom-state 'unknown)
@@ -2801,6 +2807,7 @@
     (if value
        (progn
          (custom-variable-backup-value widget)
+         (custom-push-theme 'theme-value symbol 'user 'set value)
          (condition-case nil
              (funcall set symbol (car value))
             (error nil)))
@@ -3361,6 +3368,7 @@
       ;; face-set-spec ignores empty attribute lists, so just give it
       ;; something harmless instead.
       (face-spec-set symbol '((t :foreground unspecified))))
+    (custom-push-theme 'theme-face symbol 'user 'set value)
     (put symbol 'customized-face-comment comment)
     (put symbol 'face-comment comment)
     (custom-face-state-set widget)
@@ -3409,6 +3417,7 @@
       (error "No saved value for this face"))
     (put symbol 'customized-face nil)
     (put symbol 'customized-face-comment nil)
+    (custom-push-theme 'theme-face symbol 'user 'set value)
     (face-spec-set symbol value)
     (put symbol 'face-comment comment)
     (widget-value-set child value)
@@ -3432,16 +3441,12 @@
       (error "No standard setting for this face"))
     (put symbol 'customized-face nil)
     (put symbol 'customized-face-comment nil)
+    (custom-push-theme 'theme-face symbol 'user 'reset nil)
+    (custom-theme-recalc-face symbol)
     (when (or (get symbol 'saved-face) (get symbol 'saved-face-comment))
       (put symbol 'saved-face nil)
-      (custom-push-theme 'theme-face symbol 'user 'reset nil)
-      (custom-theme-recalc-face symbol)
-      ;; Do not explictly save resets to standards without themes.
-      (if (null (cdr (get symbol 'theme-face)))
-         (put symbol  'theme-face nil))
       (put symbol 'saved-face-comment nil)
       (custom-save-all))
-    (face-spec-set symbol value)
     (put symbol 'face-comment nil)
     (widget-value-set child value)
     ;; This call manages the comment visibility




reply via email to

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