From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Missing functions? (custom-initialize-safe-set, custom-initialize-safe-default) Date: Fri, 15 Jun 2018 10:37:34 +0300 Message-ID: <83y3fg1ow1.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1529048184 23028 195.159.176.226 (15 Jun 2018 07:36:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 15 Jun 2018 07:36:24 +0000 (UTC) Cc: emacs-devel@gnu.org To: Adam Porter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 15 09:36:20 2018 Return-path: Envelope-to: ged-emacs-devel@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 1fTjHO-0005qN-VH for ged-emacs-devel@m.gmane.org; Fri, 15 Jun 2018 09:36:19 +0200 Original-Received: from localhost ([::1]:44818 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fTjJW-00088f-6k for ged-emacs-devel@m.gmane.org; Fri, 15 Jun 2018 03:38:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49810) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fTjIs-00088O-Qa for emacs-devel@gnu.org; Fri, 15 Jun 2018 03:37:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fTjIo-0006xQ-Su for emacs-devel@gnu.org; Fri, 15 Jun 2018 03:37:50 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59000) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fTjIo-0006xB-PI; Fri, 15 Jun 2018 03:37:46 -0400 Original-Received: from [176.228.60.248] (port=4990 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fTjIo-0004lM-4r; Fri, 15 Jun 2018 03:37:46 -0400 In-reply-to: (message from Adam Porter on Thu, 14 Jun 2018 18:47:20 -0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:226325 Archived-At: > From: Adam Porter > Date: Thu, 14 Jun 2018 18:47:20 -0500 > > ‘custom-initialize-safe-set’ > ‘custom-initialize-safe-default’ > These functions behave like ‘custom-initialize-set’ > (‘custom-initialize-default’, respectively), but catch errors. > If an error occurs during initialization, they set the > variable to ‘nil’ using ‘set-default’, and signal no error. > > These functions are meant for options defined in pre-loaded > files, where the STANDARD expression may signal an error > because some required variable or function is not yet defined. > The value normally gets updated in ‘startup.el’, ignoring the > value computed by ‘defcustom’. After startup, if one unsets > the value and reevaluates the ‘defcustom’, the STANDARD > expression can be evaluated without error. > > However, I cannot find those functions defined anywhere, in either > Emacs 25 or 26. Searching the git history, I see they were added in > 2005 in commit 8cb9beb32163fa3ce3b052ced646fd673814ddc6. Then they > were removed in 2009 in commit > adba8116c3a918f2f091600b60ea1700c9ea7362, however there was no reason > given, and they were not removed from the manual. Right. I have now removed them from the manual. The reason for their removal was that their introduction was a mistake in interpreting the reason for the errors signaled by custom-initialize-set and custom-initialize-default: they signaled errors because the variables couldn't be initialized at build time, since the conditions for their correct initialization couldn't be met at build time. The commit which removed these functions introduced custom-initialize-delay, which delays the actual initialization to the next Emacs startup, and all the uses of the removed functions were replaced by this new function. > I noticed this because, if I understood the manual correctly, they > sounded like they might be useful to fix a problem I was having. What is the problem you were having?