unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Missing functions? (custom-initialize-safe-set, custom-initialize-safe-default)
@ 2018-06-14 23:47 Adam Porter
  2018-06-15  7:37 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Adam Porter @ 2018-06-14 23:47 UTC (permalink / raw)
  To: emacs-devel

Hi,

Looking in the manual at info:elisp#Variable Definitions, under the
:set keyword, I see this:

‘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.

I noticed this because, if I understood the manual correctly, they
sounded like they might be useful to fix a problem I was having.

Should these functions be replaced?  If not, why were they removed,
and is there anything that replaces their functionality or obsoletes
them?  Or should they be removed from the manual?

Thanks.



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Missing functions? (custom-initialize-safe-set, custom-initialize-safe-default)
  2018-06-14 23:47 Missing functions? (custom-initialize-safe-set, custom-initialize-safe-default) Adam Porter
@ 2018-06-15  7:37 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2018-06-15  7:37 UTC (permalink / raw)
  To: Adam Porter; +Cc: emacs-devel

> From: Adam Porter <adam@alphapapa.net>
> 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?



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-06-15  7:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-14 23:47 Missing functions? (custom-initialize-safe-set, custom-initialize-safe-default) Adam Porter
2018-06-15  7:37 ` Eli Zaretskii

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).