projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8d1b753
)
Add some sanity checking of defun arglist
author
Nicolas Richard
<theonewiththeevillook@yahoo.fr>
Sun, 11 Dec 2016 01:48:10 +0000
(17:48 -0800)
committer
Glenn Morris
<rgm@gnu.org>
Sun, 11 Dec 2016 01:48:10 +0000
(17:48 -0800)
* lisp/emacs-lisp/byte-run.el (defun):
Check for malformed argument lists. (Bug#15715)
lisp/emacs-lisp/byte-run.el
patch
|
blob
|
history
diff --git
a/lisp/emacs-lisp/byte-run.el
b/lisp/emacs-lisp/byte-run.el
index 818c2683463b2b80b4e9a7b8e2af19edf8be3cef..69b4f41fef652da571a554680e71e87905f124b2 100644
(file)
--- a/
lisp/emacs-lisp/byte-run.el
+++ b/
lisp/emacs-lisp/byte-run.el
@@
-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)))