From: Stefan Monnier Date: Mon, 17 Jul 2006 21:24:17 +0000 (+0000) Subject: (custom-variable-state-set): If the variable was originally set outside X-Git-Tag: emacs-pretest-22.0.90~1393 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e0a0d9fe5c1e9110589a5d164ae1ea04f50a4191;p=emacs.git (custom-variable-state-set): If the variable was originally set outside custom, but to the same value as the default, consider it to be standard. --- diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 15efbc5ab91..0b578358f80 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -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))