summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kangas <stefankangas@gmail.com>2025-03-03 18:37:39 +0100
committerStefan Kangas <stefankangas@gmail.com>2025-03-03 18:57:17 +0100
commiteeda2a8ab1f06da5b51dc98e57ae8b4a4faa1f72 (patch)
treeed313b7e50343fc9163c0139ad36b53d5d22a26e
parent29a9fd4f4ba17822eca0f00c2037da3868bd874e (diff)
downloademacs-eeda2a8ab1f06da5b51dc98e57ae8b4a4faa1f72.tar.gz
emacs-eeda2a8ab1f06da5b51dc98e57ae8b4a4faa1f72.tar.bz2
emacs-eeda2a8ab1f06da5b51dc98e57ae8b4a4faa1f72.zip
Improve argument type error in load-theme
* lisp/custom.el (load-theme): Improve error message when passing in a non-symbol THEME argument.
-rw-r--r--lisp/custom.el2
1 files changed, 2 insertions, 0 deletions
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