diff options
author | Nicolas Richard <theonewiththeevillook@yahoo.fr> | 2016-12-10 17:48:10 -0800 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2016-12-10 17:48:10 -0800 |
commit | 010733616543f86aed9e351d5754d02864c2ea26 (patch) | |
tree | fbae26aab77b3c13750baa997aac3d400424a681 /lisp/emacs-lisp | |
parent | 8d1b753d528f741580e48d2b4a6c9b40ca06c08d (diff) | |
download | emacs-010733616543f86aed9e351d5754d02864c2ea26.tar.gz emacs-010733616543f86aed9e351d5754d02864c2ea26.tar.bz2 emacs-010733616543f86aed9e351d5754d02864c2ea26.zip |
Add some sanity checking of defun arglist
* lisp/emacs-lisp/byte-run.el (defun):
Check for malformed argument lists. (Bug#15715)
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/byte-run.el | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el index 818c2683463..69b4f41fef6 100644 --- 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))) |