Mercurial > emacs
changeset 51062:e562b94e5f9e
(macro-declaration-function): Avoid `dolist' and `cadr'.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Sun, 18 May 2003 02:31:19 +0000 |
parents | 85a1d99546f0 |
children | 66dd7f2dd70a |
files | lisp/subr.el |
diffstat | 1 files changed, 11 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/subr.el Sat May 17 23:28:38 2003 +0000 +++ b/lisp/subr.el Sun May 18 02:31:19 2003 +0000 @@ -43,13 +43,17 @@ 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)