[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 0107336: Add some sanity checking of defun arglist
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] master 0107336: Add some sanity checking of defun arglist |
Date: |
Sun, 11 Dec 2016 01:48:27 +0000 (UTC) |
branch: master
commit 010733616543f86aed9e351d5754d02864c2ea26
Author: Nicolas Richard <address@hidden>
Commit: Glenn Morris <address@hidden>
Add some sanity checking of defun arglist
* lisp/emacs-lisp/byte-run.el (defun):
Check for malformed argument lists. (Bug#15715)
---
lisp/emacs-lisp/byte-run.el | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el
index 818c268..69b4f41 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)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 0107336: Add some sanity checking of defun arglist,
Glenn Morris <=