From: Nicolas Richard Date: Sun, 11 Dec 2016 01:48:10 +0000 (-0800) Subject: Add some sanity checking of defun arglist X-Git-Tag: emacs-26.0.90~1139 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=010733616543f86aed9e351d5754d02864c2ea26;p=emacs.git Add some sanity checking of defun arglist * lisp/emacs-lisp/byte-run.el (defun): Check for malformed argument lists. (Bug#15715) --- 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)))