mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-10 00:00:39 -08:00
(ad-special-forms): Remove.
(ad-special-form-p): Use subr-arity.
This commit is contained in:
parent
44038dc83b
commit
5d08a78606
2 changed files with 8 additions and 17 deletions
|
|
@ -2467,23 +2467,11 @@ will clear the cache."
|
|||
"Take a macro function DEFINITION and make a lambda out of it."
|
||||
`(cdr ,definition))
|
||||
|
||||
;; There is no way to determine whether some subr is a special form or not,
|
||||
;; hence we need this list (which is probably out of date):
|
||||
(defvar ad-special-forms
|
||||
(let ((tem '(and catch cond condition-case defconst defmacro
|
||||
defun defvar function if interactive let let*
|
||||
or prog1 prog2 progn quote save-current-buffer
|
||||
save-excursion save-restriction save-window-excursion
|
||||
setq setq-default unwind-protect while
|
||||
with-output-to-temp-buffer)))
|
||||
;; track-mouse could be void in some configurations.
|
||||
(if (fboundp 'track-mouse)
|
||||
(push 'track-mouse tem))
|
||||
(mapcar 'symbol-function tem)))
|
||||
|
||||
(defmacro ad-special-form-p (definition)
|
||||
;;"non-nil if DEFINITION is a special form."
|
||||
(list 'memq definition 'ad-special-forms))
|
||||
(defun ad-special-form-p (definition)
|
||||
"Non-nil iff DEFINITION is a special form."
|
||||
(if (and (symbolp definition) (fboundp definition))
|
||||
(setq definition (indirect-function definition)))
|
||||
(and (subrp definition) (eq (cdr (subr-arity definition)) 'unevalled)))
|
||||
|
||||
(defmacro ad-interactive-p (definition)
|
||||
;;"non-nil if DEFINITION can be called interactively."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue