GNU bug report logs - #21695
25.0.50; Change most occurrences of `setq' in Emacs manual to `customize-set-variable'

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Fri, 16 Oct 2015 21:51:01 UTC

Severity: wishlist

Found in version 25.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Gregory Heytings <gregory <at> heytings.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: larsi <at> gnus.org, hmelman <at> gmail.com, 21695 <at> debbugs.gnu.org, rms <at> gnu.org
Subject: bug#21695: 25.0.50; Change most occurrences of `setq' in Emacs manual to `customize-set-variable'? Really?
Date: Sun, 12 Sep 2021 21:26:18 +0000
[Message part 1 (text/plain, inline)]
>> The difference is that while Emacs is being built, especially 
>> bootstrapped, calls to Lisp code that isn't preloaded by autoload.el 
>> could fail.  So such calls need to be careful not to call a symbol if 
>> the call could fail, or at least use internal_condition_case* functions 
>> to protect themselves against failure.
>
> Basically, you should use safe_call and its ilk.
>

Thank you for that clarification, done.

>
> Even then, some people will frown on 20% slowdown of the startup.
>

It is not a slowdown of the startup, it is a slowdown of setq, which 
becomes visible for the user when say 100 million setq's are executed.

Anyway, given your remark, I improved the patch.  With this optimized 
version, there is no noticeable difference for variables without a plist 
(~40 nanoseconds for each call to setq, with and without the patch), and a 
small difference for variables with a plist (~40 nanoseconds for each call 
to setq without the patch, ~42 nanoseconds with the patch).
[Warn-when-custom-variable-is-wrongly-set.patch (text/x-diff, attachment)]

This bug report was last modified 3 years and 302 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.