aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorStefan Monnier <[email protected]>2003-05-18 02:31:19 +0000
committerStefan Monnier <[email protected]>2003-05-18 02:31:19 +0000
commitb6a1ce0b31ff2dc163a614b75226130756dddf4a (patch)
treedd6508ddc00fc24c5353419fe836102d6b803968 /lisp
parentde0abe8c694031dc279bfaa3e4d8c9d90188a43b (diff)
(macro-declaration-function): Avoid `dolist' and `cadr'.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/subr.el18
1 files changed, 11 insertions, 7 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 864af300e3..54e1d04df2 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -43,13 +43,17 @@ This is set as the value of the variable `macro-declaration-function'.
MACRO is the name of the macro being defined.
DECL is a list `(declare ...)' containing the declarations.
The return value of this function is not used."
- (dolist (d (cdr decl))
- (cond ((and (consp d) (eq (car d) 'indent))
- (put macro 'lisp-indent-function (cadr d)))
- ((and (consp d) (eq (car d) 'debug))
- (put macro 'edebug-form-spec (cadr d)))
- (t
- (message "Unknown declaration %s" d)))))
+ ;; We can't use `dolist' or `cadr' yet for bootstrapping reasons.
+ (let (d)
+ ;; Ignore the first element of `decl' (it's always `declare').
+ (while (setq decl (cdr decl))
+ (setq d (car decl))
+ (cond ((and (consp d) (eq (car d) 'indent))
+ (put macro 'lisp-indent-function (car (cdr d))))
+ ((and (consp d) (eq (car d) 'debug))
+ (put macro 'edebug-form-spec (car (cdr d))))
+ (t
+ (message "Unknown declaration %s" d))))))
(setq macro-declaration-function 'macro-declaration-function)