[Top][All Lists]

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

Re: Built-in Functions and Special Forms

From: Greg Hill
Subject: Re: Built-in Functions and Special Forms
Date: Wed, 26 Feb 2003 20:02:04 -0800

At 2:38 AM +0100 2/27/03, Pascal Bourguignon wrote:
I've not found any predicate to distinguish between built-in functions
and special forms.

In Emacs-21, the documentation is consistent enough that this seems to always work.

(defun special-form-p (symbol)
    (string-match "\\.\\.\\.\\|&rest" (documentation symbol)))
Of course that should really be:

(defun special-form-p (symbol)
    (and (subrp (symbol-function symbol))
         (string-match "\\.\\.\\.\\|&rest" (documentation symbol))))

reply via email to

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