all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#50248: [DOC] Setting User Options in Init File
@ 2021-08-29  6:16 Kevin Vigouroux via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-08-29 13:05 ` Kevin Vigouroux via Bug reports for GNU Emacs, the Swiss army knife of text editors
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Kevin Vigouroux via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-08-29  6:16 UTC (permalink / raw)
  To: 50248

This is related to the closed bug #21695.

The Emacs manual does not mention that some user options must be set
using an appropriate setter function, as explained in the Emacs Lisp
Reference Manual.

#+begin_quote
15.3 Defining Customization Variables (Elisp Ref. Man.)
=====================================

‘:set SETFUNCTION’
     Specify SETFUNCTION as the way to change the value of this option
     when using the Customize interface.  The function SETFUNCTION
     should take two arguments, a symbol (the option name) and the new
     value, and should do whatever is necessary to update the value
     properly for this option (which may not mean simply setting the
     option as a Lisp variable); preferably, though, it should not
     modify its value argument destructively.  The default for
     SETFUNCTION is ‘set-default’.

     If you specify this keyword, the variable’s documentation string
     should describe how to do the same job in hand-written Lisp code.
#+end_quote

Informative text should be added to the following sections: 49.4.1 and
49.4.2.

#+begin_quote
49.4.1 Init File Syntax (Emacs manual)
-----------------------

You can set any Lisp variable with ‘setq’, but with certain variables
‘setq’ won’t do what you probably want in the init file. Some variables
automatically become buffer-local when set with ‘setq’; what you want in
the init file is to set the default value, using ‘setq-default’. Some
customizable minor mode variables do special things to enable the mode
when you set them with Customize, but ordinary ‘setq’ won’t do that; to
enable the mode in your init file, call the minor mode command. The
following section has examples of both of these methods.
#+end_quote

@Drew: Your answer on emacs.stackexchange.com is misleading [1].

[1] https://emacs.stackexchange.com/questions/17386/display-all-setq-possibilities/17389#17389





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

end of thread, other threads:[~2021-08-29 22:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-29  6:16 bug#50248: [DOC] Setting User Options in Init File Kevin Vigouroux via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-29 13:05 ` Kevin Vigouroux via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-29 18:25   ` bug#50248: [External] : " Drew Adams
2021-08-29 18:20 ` Drew Adams
2021-08-29 19:33 ` Lars Ingebrigtsen
2021-08-29 22:57   ` bug#50248: [External] : " Drew Adams

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.