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: Juanma Barranquero
Subject: Re: Test for `save-abbrevs' improvement
Date: Fri, 17 Feb 2006 11:27:18 +0100

On 2/17/06, Juanma Barranquero <address@hidden> wrote:

> I don't use Customize), but I think I'll end using
>
>   (rassoc '(silently) (get 'save-abbrevs 'custom-type))

  (and (listp (get 'save-abbrevs 'custom-type)) 'silently)

really, as the custom-type is 'boolean in 21.1. Oh well.

All in all, though the "test for functionality, not Emacs version"
mantra is a good suggestion, it breaks sometimes. In my .emacs I
advise `list-faces-display' to add to it the "C-u means ask for
regexp" feature of 22.X, but only if it is not there already. I didn't
find any way easier than:

(let ((code (symbol-function #'list-faces-display)))
  (when (and (byte-code-function-p code)
             (null (aref code 0)))
    ;; Stuff for pre-22.X versions
    ;; ...
    ))

Ugh.

--
                    /L/e/k/t/u




reply via email to

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