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 19:45:16 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

At 2017-05-12T15:08:44-07:00, Drew Adams wrote:

> Please consider filing an enhancement request that would make
> them optionally check the type (e.g. by an optional argument):
> `M-x report-emacs-bug'.

I've done that.

> While waiting (... ;-)) you can define your own function,
> similar to `customize-set-variable' but which does the type
> checking.  Here is the type-checking code from `set-variable':
>
> (let ((type  (get variable 'custom-type)))
>   (when type    ; Match with custom type.
>     (require 'cus-edit)
>     (setq type  (widget-convert type))
>     (unless (widget-apply type :match value)
>       (error "Value `%S' does not match type %S of %S"
>              value (car type) variable))))

Yes, I saw that part of `set-variable'.  Probably, I'll add a piece of
:before or :before-while advice to `custom-set-variable' to do this in
my init file.  There are so many setq's in the init file, most of which,
I'm sure, are for options, that it will take me a while to migrate them
to this modified `custom-set-variable'.

> See these threads:
> http://lists.gnu.org/archive/html/emacs-devel/2010-10/msg00813.html
> http://lists.gnu.org/archive/html/emacs-devel/2006-06/msg00137.html
> http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg00106.html
> http://lists.gnu.org/archive/html/emacs-devel/2015-10/msg01481.html

Interesting reading that.  Thanks.

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]