emacs-devel
[Top][All Lists]
Advanced

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

advice.el and special forms


From: Stuart D. Herring
Subject: advice.el and special forms
Date: Thu, 14 Jul 2005 12:43:01 -0700 (PDT)
User-agent: SquirrelMail/1.4.4-2

There's a list of known special forms in advice.el, along with a function
to check membership in the list and a comment lamenting being unable to
determine directly if a subr is a special form.  Presumably this predates
subr-arity: is there some reason not to wipe ad-special-forms and
ad-special-form-p and just use

(and (subrp def) (eq (cdr (subr-arity def)) 'unevalled))

?  It's long enough (what with the safety check) that it would do well as
a standard function behaving like subrp (presumably in subr.el).

(defun special-form-p (object)
  "Return t if OBJECT is a special form."
  (and (subrp object) (eq (cdr (subr-arity object)) 'unevalled)))

If this sounds reasonable, I've attached a patch (which my mailer insists
should be application/octet-stream; sorry) that creates that function and
uses it (all two times that advice.el does this).  If this counts as a
papers-needing change, I'm already trying to finish that process.

Davis Herring

-- 
This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.

Attachment: sfp.patch
Description: Binary data

Attachment: ChangeLog
Description: Binary data


reply via email to

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