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: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Gregory Heytings <gregory <at> heytings.org>
Cc: 21695 <at> debbugs.gnu.org, hmelman <at> gmail.com, rms <at> gnu.org
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
Gregory Heytings <gregory <at> 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




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

Previous Next


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