]> git.eshelyaron.com Git - emacs.git/commitdiff
(custom-variable-state-set): If the variable was originally set outside
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 17 Jul 2006 21:24:17 +0000 (21:24 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 17 Jul 2006 21:24:17 +0000 (21:24 +0000)
custom, but to the same value as the default, consider it to be standard.

lisp/cus-edit.el

index 15efbc5ab9113bd6b0e64bf9c445a449df88c998..0b578358f80e7eef4c326233859f1f67402ac90e 100644 (file)
@@ -2668,7 +2668,18 @@ Otherwise, look up symbol in `custom-guess-type-alist'."
                             (error nil))
                           (cond
                            ((eq (caar tmp) 'user) 'saved)
-                           ((eq (caar tmp) 'changed) 'changed)
+                           ((eq (caar tmp) 'changed)
+                             (if (condition-case nil
+                                     (and (null comment)
+                                          (equal value
+                                                 (eval
+                                                  (car (get symbol 'standard-value)))))
+                                   (error nil))
+                                 ;; The value was originally set outside
+                                 ;; custom, but it was set to the standard
+                                 ;; value (probably an autoloaded defcustom).
+                                 'standard
+                               'changed))
                            (t 'themed))
                         'changed))
                      ((setq tmp (get symbol 'standard-value))