mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
Improve argument type error in load-theme
* lisp/custom.el (load-theme): Improve error message when passing in a non-symbol THEME argument.
This commit is contained in:
parent
29a9fd4f4b
commit
eeda2a8ab1
1 changed files with 2 additions and 0 deletions
|
|
@ -1326,6 +1326,8 @@ Return t if THEME was successfully loaded, nil otherwise."
|
||||||
(mapcar #'symbol-name
|
(mapcar #'symbol-name
|
||||||
(custom-available-themes))))
|
(custom-available-themes))))
|
||||||
nil nil))
|
nil nil))
|
||||||
|
(unless (symbolp theme)
|
||||||
|
(signal 'wrong-type-argument (list 'symbolp theme)))
|
||||||
(unless (custom-theme-name-valid-p theme)
|
(unless (custom-theme-name-valid-p theme)
|
||||||
(error "Invalid theme name `%s'" theme))
|
(error "Invalid theme name `%s'" theme))
|
||||||
;; If THEME is already enabled, re-enable it after loading, even if
|
;; If THEME is already enabled, re-enable it after loading, even if
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue