mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-22 07:09:54 +00:00
Improve defface error message
* lisp/cus-face.el (custom-declare-face): Improve the error message when there's a missing doc string (bug#51576).
This commit is contained in:
parent
bf47bc8b94
commit
57d54bb49d
@ -31,6 +31,9 @@
|
||||
|
||||
(defun custom-declare-face (face spec doc &rest args)
|
||||
"Like `defface', but with FACE evaluated as a normal argument."
|
||||
(when (and doc
|
||||
(not (stringp doc)))
|
||||
(error "Invalid (or missing) doc string %S" doc))
|
||||
(unless (get face 'face-defface-spec)
|
||||
(face-spec-set face (purecopy spec) 'face-defface-spec)
|
||||
(push (cons 'defface face) current-load-list)
|
||||
|
Loading…
Reference in New Issue
Block a user