From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.bugs Subject: bug#25770: delayed-init custom variables are not special Date: Fri, 17 Feb 2017 22:22:05 -0500 Message-ID: References: <9dmvdljqay.fsf@fencepost.gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1487388195 29041 195.159.176.226 (18 Feb 2017 03:23:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 18 Feb 2017 03:23:15 +0000 (UTC) User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) Cc: Stefan Monnier To: 25770@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 18 04:23:10 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cevc4-0006yp-NU for geb-bug-gnu-emacs@m.gmane.org; Sat, 18 Feb 2017 04:23:08 +0100 Original-Received: from localhost ([::1]:56936 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cevc9-0001Gh-Td for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Feb 2017 22:23:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53381) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cevby-0001G2-Rw for bug-gnu-emacs@gnu.org; Fri, 17 Feb 2017 22:23:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cevby-0002bn-4u for bug-gnu-emacs@gnu.org; Fri, 17 Feb 2017 22:23:02 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45820) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cevby-0002bc-1l for bug-gnu-emacs@gnu.org; Fri, 17 Feb 2017 22:23:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cevbx-0003lL-QM for bug-gnu-emacs@gnu.org; Fri, 17 Feb 2017 22:23:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Feb 2017 03:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25770 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25770-submit@debbugs.gnu.org id=B25770.148738813914400 (code B ref 25770); Sat, 18 Feb 2017 03:23:01 +0000 Original-Received: (at 25770) by debbugs.gnu.org; 18 Feb 2017 03:22:19 +0000 Original-Received: from localhost ([127.0.0.1]:44019 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cevbH-0003kC-Ge for submit@debbugs.gnu.org; Fri, 17 Feb 2017 22:22:19 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:33885) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cevbG-0003jz-0d for 25770@debbugs.gnu.org; Fri, 17 Feb 2017 22:22:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cevbA-0002CC-32 for 25770@debbugs.gnu.org; Fri, 17 Feb 2017 22:22:12 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38735) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cevb9-0002C4-VW; Fri, 17 Feb 2017 22:22:12 -0500 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1cevb8-0001zC-4N; Fri, 17 Feb 2017 22:22:10 -0500 X-Spook: Closure Conventional weapon AFSPC AVN Al Qa'ida Virual X-Ran: )zi#RNt|9o=/pKm3`4aFhqn{c$X"W'3:7;u/J(|Rspxu!lr"wm+uwS)*>3k}"eKroW^a[z X-Hue: yellow X-Attribution: GM In-Reply-To: <9dmvdljqay.fsf@fencepost.gnu.org> (Glenn Morris's message of "Fri, 17 Feb 2017 01:15:49 -0500") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:129472 Archived-At: 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