From: Glenn Morris <rgm@gnu.org>
To: 25770@debbugs.gnu.org
Cc: Stefan Monnier <monnier@iro.umontreal.ca>
Subject: bug#25770: delayed-init custom variables are not special
Date: Fri, 17 Feb 2017 22:22:05 -0500 [thread overview]
Message-ID: <gitw7s89pe.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <9dmvdljqay.fsf@fencepost.gnu.org> (Glenn Morris's message of "Fri, 17 Feb 2017 01:15:49 -0500")
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)))))
+
\f
;;; Custom Themes
next prev parent reply other threads:[~2017-02-18 3:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-17 6:15 bug#25770: delayed-init custom variables are not special Glenn Morris
2017-02-18 3:22 ` Glenn Morris [this message]
2017-02-21 9:41 ` Tino Calancha
2017-02-21 18:06 ` Glenn Morris
2017-02-21 18:24 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=gitw7s89pe.fsf@fencepost.gnu.org \
--to=rgm@gnu.org \
--cc=25770@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).