# HG changeset patch # User Chong Yidong # Date 1228014018 0 # Node ID b42d22c5897fc1ef2219cac4a6a0c314eef85ff4 # Parent cb2c537a8fea5f2a6ed6d6a913fa0de9effaee92 (macro-declaration-function): Disallow declare specs with lengths of 3 or more. diff -r cb2c537a8fea -r b42d22c5897f lisp/emacs-lisp/byte-run.el --- a/lisp/emacs-lisp/byte-run.el Sun Nov 30 02:59:18 2008 +0000 +++ b/lisp/emacs-lisp/byte-run.el Sun Nov 30 03:00:18 2008 +0000 @@ -45,14 +45,19 @@ ;; 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)))) - ((and (consp d) (eq (car d) 'doc-string)) - (put macro 'doc-string-elt (car (cdr d)))) - (t - (message "Unknown declaration %s" d)))))) + (if (and (consp d) + (listp (cdr d)) + (null (cdr (cdr d)))) + (cond ((eq (car d) 'indent) + (put macro 'lisp-indent-function (car (cdr d)))) + ((eq (car d) 'debug) + (put macro 'edebug-form-spec (car (cdr d)))) + ((eq (car d) 'doc-string) + (put macro 'doc-string-elt (car (cdr d)))) + (t + (message "Unknown declaration %s" d))) + (message "Invalid declaration %s" d))))) + (setq macro-declaration-function 'macro-declaration-function)