From e0a0d9fe5c1e9110589a5d164ae1ea04f50a4191 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 17 Jul 2006 21:24:17 +0000 Subject: [PATCH] (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. --- lisp/cus-edit.el | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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)) -- 2.39.2