bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#21695: 25.0.50; Change most occurrences of `setq' in Emacs manual to


From: Gregory Heytings
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


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

Attachment: Warn-when-custom-variable-is-wrongly-set.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]