all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kevin Rodgers <ihs_4664@yahoo.com>
Cc: emacs-devel@gnu.org
Subject: Re: Test for `save-abbrevs' improvement
Date: Fri, 17 Feb 2006 09:41:16 -0800 (PST)	[thread overview]
Message-ID: <20060217174116.82617.qmail@web51001.mail.yahoo.com> (raw)
In-Reply-To: <f7ccd24b0602170227k594dd638l30f767d162807d94@mail.gmail.com>

Juanma Barranquero <lekktu@gmail.com> wrote:
> On 2/17/06, Juanma Barranquero <lekktu@gmail.com> wrote:
> 
> > I don't use Customize), but I think I'll end using
> >
> >   (rassoc '(silently) (get 'save-abbrevs 'custom-type))

No, you don't want to match (function silently), only (const silently),
and then only if it is actually a choice widget:

(let ((custom-type (get 'save-abbrevs 'custom-type)))
  (and (consp custom-type)
       (eq (car custom-type) 'choice)
       (member '(const silently) custom-type)))

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

That looks completely wrong to me.  What are you trying to express?

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

What?  I thought your goal was to determine whether or not save-abbrevs
could be meaningfully set to silently.  If it has type boolean, nil is
the only distinguished value and silently is just another non-nil value.

> 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.

Isn't there something like:

(and (fboundp 'function-arity)
     (> (function-arity 'list-faces-display) 0))

-- 
Kevin


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

  reply	other threads:[~2006-02-17 17:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-16 14:39 Test for `save-abbrevs' improvement Juanma Barranquero
2006-02-16 20:46 ` Kevin Rodgers
2006-02-17  9:41   ` Juanma Barranquero
2006-02-17 10:27     ` Juanma Barranquero
2006-02-17 17:41       ` Kevin Rodgers [this message]
2006-02-17 20:31         ` Juanma Barranquero

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060217174116.82617.qmail@web51001.mail.yahoo.com \
    --to=ihs_4664@yahoo.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.