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)
This commit is contained in:
Glenn Morris 2016-12-10 18:58:24 -08:00
parent 0107336165
commit ba8e883fa3
2 changed files with 4 additions and 0 deletions
lisp/emacs-lisp

View file

@ -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)))))