unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#21695: 25.0.50; Change most occurrences of `setq' in Emacs manual to `customize-set-variable'
@ 2015-10-16 21:50 Drew Adams
  2015-10-16 23:57 ` Drew Adams
                   ` (2 more replies)
  0 siblings, 3 replies; 76+ messages in thread
From: Drew Adams @ 2015-10-16 21:50 UTC (permalink / raw)
  To: 21695

Please (case by case) change examples that use `setq' to set an option
value, so that they instead use one of the Customize functions
(`customize-set-variable', `custom-set-variables', etc.).

Using `setq' in an init file to set option values is error prone.  It is
not a good habit to develop, because (1) there are some options whose
`defcustom's use `:set', `:initialize' etc. (and `setq' ignores such),
and (2) `setq' does no type checking.

There are currently no occurrences of `customize-set-variable' or
`custom-set-variables' in the Emacs manual.  There are lots of uses of
`setq' in the Emacs manual.  Yet many (most?) of them are for setting
user-option values.  No distinction is made between setting options and
other variables (`defvar's).

Sure, many `defcustom's have a simple `:type' and no `:set' or
`:initialize' etc., so in practice it often does not really matter
whether you use `setq' or one of the Customize functions to set the
value.  Still, the manual should set a good example, and it is better to
not get in the habit of assuming that `setq' is sufficient to properly
set a user option.  I've see questions about this from users many times.
(Most often it is a problem with type and not with setter or initializer
functions.)  It is often not obvious (how should it be) to users what is
wrong when they get into trouble by using `setq'.

In GNU Emacs 25.0.50.1 (i686-pc-mingw32)
 of 2015-10-06
Bzr revision: a4a98a1b2568793ead43e824ecf227768759df12
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/Devel/emacs/snapshot/trunk
 --enable-checking=yes,glyphs 'CFLAGS=-O0 -g3'
 LDFLAGS=-Lc:/Devel/emacs/lib 'CPPFLAGS=-DGC_MCHECK=1
 -Ic:/Devel/emacs/include''





^ permalink raw reply	[flat|nested] 76+ messages in thread

end of thread, other threads:[~2021-09-18  9:20 UTC | newest]

Thread overview: 76+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-16 21:50 bug#21695: 25.0.50; Change most occurrences of `setq' in Emacs manual to `customize-set-variable' Drew Adams
2015-10-16 23:57 ` Drew Adams
2021-05-26 22:30 ` Lars Ingebrigtsen
2021-08-29 19:05 ` Drew Adams
2021-08-29 22:36   ` Drew Adams
2021-08-29 22:52     ` Drew Adams
2021-08-29 22:58       ` Drew Adams
2021-08-31  3:06     ` bug#21695: 25.0.50; Change most occurrences of `setq' in Emacs manual to `customize-set-variable'? Really? Richard Stallman
2021-08-31  3:43       ` Arthur Miller
2021-08-31 16:15         ` bug#21695: [External] : " Drew Adams
2021-08-31 16:15       ` Drew Adams
2021-09-02  6:53         ` Kevin Vigouroux via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-09-02 17:08           ` Drew Adams
2021-09-03  9:54             ` bug#21695: 25.0.50; Change most occurrences of `setq' in Emacs manual to `customize-set-variable' Kevin Vigouroux via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-09-01  3:07       ` bug#21695: 25.0.50; Change most occurrences of `setq' in Emacs manual to `customize-set-variable'? Really? Howard Melman
2021-09-02  3:42         ` Richard Stallman
2021-09-02  6:53           ` Eli Zaretskii
2021-09-02 17:08             ` bug#21695: [External] : " Drew Adams
2021-09-02 17:17               ` Eli Zaretskii
2021-09-05  3:42                 ` Richard Stallman
2021-09-05  3:43             ` Richard Stallman
2021-09-06 17:43               ` Eli Zaretskii
2021-09-08  3:23                 ` Richard Stallman
2021-09-08  7:03                   ` Eli Zaretskii
2021-09-09  3:11                     ` Richard Stallman
2021-09-09  6:52                       ` Eli Zaretskii
2021-09-09  7:43                   ` Gregory Heytings
2021-09-09 11:44                     ` Gregory Heytings
2021-09-09 12:07                       ` Lars Ingebrigtsen
2021-09-09 12:12                         ` Gregory Heytings
2021-09-09 12:15                           ` Lars Ingebrigtsen
2021-09-09 12:40                             ` Gregory Heytings
2021-09-09 12:47                               ` Lars Ingebrigtsen
2021-09-09 13:04                                 ` Gregory Heytings
2021-09-09 13:10                                   ` Lars Ingebrigtsen
2021-09-09 14:27                                     ` Gregory Heytings
2021-09-10 10:15                                       ` Lars Ingebrigtsen
2021-09-10 14:26                                         ` Gregory Heytings
2021-09-12  8:23                                           ` Gregory Heytings
2021-09-12  8:57                                             ` Eli Zaretskii
2021-09-12  9:30                                               ` Gregory Heytings
2021-09-12  9:37                                                 ` Eli Zaretskii
2021-09-12  9:54                                                   ` Gregory Heytings
2021-09-12 10:11                                                     ` Eli Zaretskii
2021-09-12 10:21                                                       ` Eli Zaretskii
2021-09-12 21:26                                                       ` Gregory Heytings
2021-09-12 22:11                                                         ` Gregory Heytings
2021-09-13  7:04                                                         ` Lars Ingebrigtsen
2021-09-13  9:11                                                           ` Gregory Heytings
2021-09-13  9:18                                                             ` Lars Ingebrigtsen
2021-09-13 13:00                                                               ` Gregory Heytings
2021-09-13 13:56                                                                 ` Eli Zaretskii
2021-09-13 12:17                                                             ` Eli Zaretskii
2021-09-13 11:31                                                         ` Eli Zaretskii
2021-09-13  8:03                                                       ` martin rudalics
2021-09-13  9:14                                                         ` Gregory Heytings
2021-09-13 12:36                                                           ` martin rudalics
2021-09-13 12:52                                                             ` Gregory Heytings
2021-09-15  9:27                                                               ` martin rudalics
2021-09-15 10:00                                                                 ` Gregory Heytings
2021-09-15 20:13                                                                 ` Richard Stallman
2021-09-16  6:56                                                                   ` martin rudalics
2021-09-18  0:30                                                                     ` Richard Stallman
2021-09-18  7:34                                                                       ` martin rudalics
2021-09-18  9:20                                                                       ` Gregory Heytings
2021-09-13  1:17                                           ` Richard Stallman
2021-09-10  3:41                               ` Richard Stallman
2021-09-10 13:49                                 ` Gregory Heytings
2021-09-13  1:17                                   ` Richard Stallman
2021-09-02 17:08           ` bug#21695: [External] : " Drew Adams
2021-09-05  3:42             ` Richard Stallman
2021-09-04  3:38           ` Richard Stallman
2021-09-01 12:48       ` Augusto Stoffel
2021-09-02  3:38         ` Richard Stallman
2021-09-02  6:56           ` Eli Zaretskii
2021-09-02 17:07           ` bug#21695: [External] : " Drew Adams

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).