Mercurial > emacs
comparison lisp/emacs-lisp/byte-run.el @ 100064:b42d22c5897f
(macro-declaration-function): Disallow declare specs with lengths of 3
or more.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Sun, 30 Nov 2008 03:00:18 +0000 |
parents | 90a2847062be |
children | a9dc0e7c3f2b |
comparison
equal
deleted
inserted
replaced
100063:cb2c537a8fea | 100064:b42d22c5897f |
---|---|
43 ;; We can't use `dolist' or `cadr' yet for bootstrapping reasons. | 43 ;; We can't use `dolist' or `cadr' yet for bootstrapping reasons. |
44 (let (d) | 44 (let (d) |
45 ;; Ignore the first element of `decl' (it's always `declare'). | 45 ;; Ignore the first element of `decl' (it's always `declare'). |
46 (while (setq decl (cdr decl)) | 46 (while (setq decl (cdr decl)) |
47 (setq d (car decl)) | 47 (setq d (car decl)) |
48 (cond ((and (consp d) (eq (car d) 'indent)) | 48 (if (and (consp d) |
49 (put macro 'lisp-indent-function (car (cdr d)))) | 49 (listp (cdr d)) |
50 ((and (consp d) (eq (car d) 'debug)) | 50 (null (cdr (cdr d)))) |
51 (put macro 'edebug-form-spec (car (cdr d)))) | 51 (cond ((eq (car d) 'indent) |
52 ((and (consp d) (eq (car d) 'doc-string)) | 52 (put macro 'lisp-indent-function (car (cdr d)))) |
53 (put macro 'doc-string-elt (car (cdr d)))) | 53 ((eq (car d) 'debug) |
54 (t | 54 (put macro 'edebug-form-spec (car (cdr d)))) |
55 (message "Unknown declaration %s" d)))))) | 55 ((eq (car d) 'doc-string) |
56 (put macro 'doc-string-elt (car (cdr d)))) | |
57 (t | |
58 (message "Unknown declaration %s" d))) | |
59 (message "Invalid declaration %s" d))))) | |
60 | |
56 | 61 |
57 (setq macro-declaration-function 'macro-declaration-function) | 62 (setq macro-declaration-function 'macro-declaration-function) |
58 | 63 |
59 | 64 |
60 ;; Redefined in byte-optimize.el. | 65 ;; Redefined in byte-optimize.el. |