From eeda2a8ab1f06da5b51dc98e57ae8b4a4faa1f72 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Mon, 3 Mar 2025 18:37:39 +0100 Subject: [PATCH] Improve argument type error in load-theme * lisp/custom.el (load-theme): Improve error message when passing in a non-symbol THEME argument. --- lisp/custom.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/custom.el b/lisp/custom.el index dee55d9ed11..5360c397c59 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -1326,6 +1326,8 @@ Return t if THEME was successfully loaded, nil otherwise." (mapcar #'symbol-name (custom-available-themes)))) nil nil)) + (unless (symbolp theme) + (signal 'wrong-type-argument (list 'symbolp theme))) (unless (custom-theme-name-valid-p theme) (error "Invalid theme name `%s'" theme)) ;; If THEME is already enabled, re-enable it after loading, even if