1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-20 10:23:57 +00:00

(macro-declaration-function): Disallow declare specs with lengths of 3

or more.
This commit is contained in:
Chong Yidong 2008-11-30 03:00:18 +00:00
parent 5829445e82
commit 15183da671

View File

@ -45,14 +45,19 @@ The return value of this function is not used."
;; 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)