From 2541bec21bf3cf090071e434dac170d52394594e Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Sat, 3 Dec 2022 02:04:48 +0100 Subject: [PATCH] * lisp/bindings.el (bound-and-true-p): Verify argument is a symbol --- lisp/bindings.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/bindings.el b/lisp/bindings.el index c1ad5f7520e..a3f51ebb315 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el @@ -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. -- 2.39.5