help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: About how misspelled word are displayed


From: N. Raghavendra
Subject: Re: About how misspelled word are displayed
Date: Sat, 13 May 2017 02:58:42 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

At 2017-05-12T10:32:36-07:00, Drew Adams wrote:

> It is particularly options, not faces, that can be
> problematic if you don't use the `custom*' functions,
> because of defcustom :set and :initialize triggers,
> as I mentioned.
>
> ...
>
> You can even get into trouble by not respecting the
> defcustom :type.  Things might be OK in some contexts
> but not in others, and you might well have trouble
> figuring out just what is wrong.
>
> Knowing this won't stop you from doing whatever you
> want, of course. ;-)
>
> But if you're really interested in using Lisp to set
> options or faces then you might want to get to know
> function `customize-set-variable' (or `custom-set-faces'
> or `custom-set-variables'), if you are not already
> familiar with it.  Or not.

Evaluating (customize-set-variable option value) uses the :set property
of OPTION, but doesn't check that VALUE has the type specified in the
(defcustom option ...)  expression.  On the other hand, evaluating
(set-variable option value) does this type-checking, but ignores the
:set property of OPTION.  So, is there a recommended way of setting an
option using Emacs Lisp directly (without going through customization
buffers), which ensures that the :set, :type, :initialize, and other
specifications of the option are respected?

Raghu.

--
N. Raghavendra <raghu@hri.res.in>, http://www.retrotexts.net/
Harish-Chandra Research Institute, http://www.hri.res.in/



reply via email to

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