1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00

* lisp/bindings.el (bound-and-true-p): Verify argument is a symbol

This commit is contained in:
Juanma Barranquero 2022-12-03 02:04:48 +01:00
parent 73d169c7db
commit 2541bec21b

View File

@ -670,6 +670,8 @@ or not."
"Return the value of symbol VAR if it is bound, else nil.
Note that if `lexical-binding' is in effect, this function isn't
meaningful if it refers to a lexically bound variable."
(unless (symbolp var)
(signal 'wrong-type-argument (list 'symbolp var)))
`(and (boundp (quote ,var)) ,var))
;; Use mode-line-mode-menu for local minor-modes only.