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: Lars Ingebrigtsen
Subject: bug#21695: 25.0.50; Change most occurrences of `setq' in Emacs manual to `customize-set-variable'? Really?
Date: Mon, 13 Sep 2021 11:18:11 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Gregory Heytings <gregory@heytings.org> writes:

> No, (latin1-display 'latin-2) does not raise a warning with the patch,
> because latin1-disp.el is bytecompiled, and Fsetq is not used when
> bytecompiled code is executed (bytecompiled code only uses Fset).

Right.  But it's perfectly valid to run uncompiled code, and these
warnings would be false positives in that case.

> That being said, I would say that using (setq latin1-display t) when
> latin1-display has a :set is always a bug, in the init file,
> interactively, or in built-in code (bytecompiled or not), and that
> (set 'latin1-display t) should be used instead.  WDYT?

I have not studied the code -- I just picked a variable at random.  The
point is that code in a package will commonly use setq on the user
options to implement the code, and this is how it should be.

(Also note that your patch will issue a bunch of warnings if the user
does an `eval-buffer' after loading .emacs into a buffer and then
evaling it (in a running Emacs).)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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