emacs-devel
[Top][All Lists]
Advanced

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

Re: Test for `save-abbrevs' improvement


From: Kevin Rodgers
Subject: Re: Test for `save-abbrevs' improvement
Date: Thu, 16 Feb 2006 13:46:38 -0700
User-agent: Mozilla Thunderbird 0.9 (X11/20041105)

Juanma Barranquero wrote:
Often it is said here that it is best to check for features, and not
for specific Emacs versions.

What about changes to allowed values for a variable?

`save-abbrevs' now accepts the value `silently', but that feature has
neither new variables nor functions to test for. And I don't want to
simply set `save-abbrevs' to `silently' because then, 21.1 asks me
every time about saving the abbreviations.

What would be the wisest way to check for it?

  (string-match "`silently'"
                (documentation-property 'save-abbrevs
                                        'variable-documentation))

seems hardly elegant...

How about:

(member '(const silently) (custom-variable-type 'save-abbrevs))

--
Kevin Rodgers





reply via email to

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