[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Using "Emacs Configure" **and** modifying .emacs
From: |
Drew Adams |
Subject: |
RE: Using "Emacs Configure" **and** modifying .emacs |
Date: |
Fri, 11 Aug 2017 12:15:27 -0700 (PDT) |
> > It is fine to use Lisp. It is generally not
> > advisable to use it without knowing what the
> > functions you use do (or don't do).
> > That's one way to learn, of course, - by
> > experimenting, but it can also help to read
> > the fine manual.
>
> For setting single variables, one would think
> using common sense, and the kind of common
> sense that comes with using computers every day
> and evermore pushing the envelope to increase
> one's understanding, it would seem this would
> be enough, at the very least if the docstring
> (help system) also is consulted for the
> specific setting. But reading the manual is
> always encouraged, of course.
>
> If the docstring isn't enough, but the manual
> is, one can report it as a bug and suggest how
> the docstring can be improved.
Yes, the doc string for such an option should warn you
not to just use `setq'. But not every doc string is
perfect. ;-)
The Elisp manual, node `Variable Definitions' says:
‘: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.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
http://www.gnu.org/software/emacs/manual/html_node/elisp/Variable-Definitions.html
Note the second paragraph. If you define an option with a
`defcustom' that uses `:set', help users of your option by
letting them know how to change the value using Lisp. How
to change the value typically does not mean using only `setq'
in such a case.
- Re: Using "Emacs Configure" **and** modifying .emacs, (continued)
- Re: Using "Emacs Configure" **and** modifying .emacs, Óscar Fuentes, 2017/08/10
- Re: Using "Emacs Configure" **and** modifying .emacs, Emanuel Berg, 2017/08/10
- Re: Using "Emacs Configure" **and** modifying .emacs, Ronald Fischer, 2017/08/11
- Re: Using "Emacs Configure" **and** modifying .emacs, Emanuel Berg, 2017/08/11
- Re: Using "Emacs Configure" **and** modifying .emacs, Tomas Nordin, 2017/08/11
- Message not available
- Re: Using "Emacs Configure" **and** modifying .emacs, notbob, 2017/08/11
- Re: Using "Emacs Configure" **and** modifying .emacs, Emanuel Berg, 2017/08/11
- RE: Using "Emacs Configure" **and** modifying .emacs, Drew Adams, 2017/08/11
- Re: Using "Emacs Configure" **and** modifying .emacs, Emanuel Berg, 2017/08/11
- RE: Using "Emacs Configure" **and** modifying .emacs,
Drew Adams <=
- Re: Using "Emacs Configure" **and** modifying .emacs, ken, 2017/08/12
- Re: Using "Emacs Configure" **and** modifying .emacs, Emanuel Berg, 2017/08/12
- Re: Using "Emacs Configure" **and** modifying .emacs, ken, 2017/08/12
- Re: Using "Emacs Configure" **and** modifying .emacs, Emanuel Berg, 2017/08/13
- Message not available
- Re: Using "Emacs Configure" **and** modifying .emacs, notbob, 2017/08/11
- Re: Using "Emacs Configure" **and** modifying .emacs, Emanuel Berg, 2017/08/11
- Message not available
- Re: Using "Emacs Configure" **and** modifying .emacs, HASM, 2017/08/11
- Re: Using "Emacs Configure" **and** modifying .emacs, Emanuel Berg, 2017/08/11
- Message not available
- Re: Using "Emacs Configure" **and** modifying .emacs, Alan Mackenzie, 2017/08/11
- Re: Using "Emacs Configure" **and** modifying .emacs, HASM, 2017/08/11