# HG changeset patch # User Stefan Monnier # Date 1153171457 0 # Node ID 2cbf89629cad621d4b0bd667b3e1b2411fea36d1 # Parent 5021520a58bdebb0d78d692a7158dba0fe05d899 (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 -r 5021520a58bd -r 2cbf89629cad lisp/cus-edit.el --- a/lisp/cus-edit.el Mon Jul 17 21:22:50 2006 +0000 +++ b/lisp/cus-edit.el Mon Jul 17 21:24:17 2006 +0000 @@ -2668,7 +2668,18 @@ (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))