bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#25770: delayed-init custom variables are not special


From: Glenn Morris
Subject: bug#25770: delayed-init custom variables are not special
Date: Fri, 17 Feb 2017 22:22:05 -0500
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

Glenn Morris wrote:

> It seems that defcustoms that use custom-initialize-delay end up not
> being special.

Maybe something like this?

--- i/lisp/custom.el
+++ w/lisp/custom.el
@@ -764,9 +764,12 @@ custom-reevaluate-setting
 Use the :set function to do so.  This is useful for customizable options
 that are defined before their standard value can really be computed.
 E.g. dumped variables whose default depends on run-time information."
-  (funcall (or (get symbol 'custom-set) 'set-default)
-          symbol
-          (eval (car (or (get symbol 'saved-value) (get symbol 
'standard-value))))))
+  (let ((val (car (or (get symbol 'saved-value)
+                     (get symbol 'standard-value)))))
+    (if (default-boundp symbol)
+       (funcall (or (get symbol 'custom-set) 'set-default) symbol (eval val))
+      (eval `(defvar ,symbol ,val)))))
+
 
 
 ;;; Custom Themes





reply via email to

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