From ba8e883fa30f1267c27751c1ee9df25a5dde4c0c Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 10 Dec 2016 18:58:24 -0800 Subject: Do not allow nil to be defined as a function * lisp/emacs-lisp/byte-run.el (defun): * src/data.c (Ffset): Do not allow "nil". (Bug#25110) --- lisp/emacs-lisp/byte-run.el | 1 + 1 file changed, 1 insertion(+) (limited to 'lisp/emacs-lisp') diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el index 69b4f41fef6..9d2a048f365 100644 --- a/lisp/emacs-lisp/byte-run.el +++ b/lisp/emacs-lisp/byte-run.el @@ -240,6 +240,7 @@ The return value is undefined. ;; from ;; (defun foo (arg) (toto)). (declare (doc-string 3) (indent 2)) + (or name (error "Cannot define '%s' as a function" name)) (if (null (and (listp arglist) (null (delq t (mapcar #'symbolp arglist))))) -- cgit v1.2.3