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: Mon, 13 Sep 2021 09:11:11 +0000


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

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?





reply via email to

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