Add some sanity checking of defun arglist
* lisp/emacs-lisp/byte-run.el (defun): Check for malformed argument lists. (Bug#15715)
This commit is contained in:
parent
8d1b753d52
commit
0107336165
1 changed files with 4 additions and 0 deletions
|
@ -240,6 +240,10 @@ The return value is undefined.
|
|||
;; from
|
||||
;; (defun foo (arg) (toto)).
|
||||
(declare (doc-string 3) (indent 2))
|
||||
(if (null
|
||||
(and (listp arglist)
|
||||
(null (delq t (mapcar #'symbolp arglist)))))
|
||||
(error "Malformed arglist: %s" arglist))
|
||||
(let ((decls (cond
|
||||
((eq (car-safe docstring) 'declare)
|
||||
(prog1 (cdr docstring) (setq docstring nil)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue