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: Eli Zaretskii <eliz <at> gnu.org>
To: Gregory Heytings <gregory <at> heytings.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: Mon, 13 Sep 2021 15:17:56 +0300
> Date: Mon, 13 Sep 2021 09:11:11 +0000
> From: Gregory Heytings <gregory <at> heytings.org>
> Cc: 21695 <at> debbugs.gnu.org, hmelman <at> gmail.com, rms <at> gnu.org
> 
> 
> >> +	if (!EQ (plist, Qnil) && !NILP (Fplist_get (plist, Qcustom_set)))
> >> +	  safe_call2 (Qdisplay_warning, Qsetq,
> >> +		      CALLN (Fformat,
> >> +			     build_string
> >> +			     ("`%s' should be set with `customize-set-variable'"),
> >> +			     sym));
> >
> > I haven't tried the patch, but won't this be triggered by the code 
> > that's handling the variables?  For instance, `latin1-display' has a 
> > :set, but the file itself does `(setq latin1-display t)' etc.  (This is 
> > a very common pattern.)
> >
> 
> 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).

So the warning will not be shown for byte-compiled code?  I think it
might be not a good idea, as many users byte-compile their init files.

> 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 think forcing people to use 'set' instead is too much of a
punishment.




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.