diff options
author | Po Lu <luangruo@yahoo.com> | 2022-05-09 20:23:20 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2022-05-09 20:23:40 +0800 |
commit | 83e2e961b013fe086072fd8dbc7eb8d17cc586d1 (patch) | |
tree | c9eb1f216eb0e0284586ce5a4a879b5a4878f690 | |
parent | 3eb82181fc328e6503b6cff5321f201322489d3f (diff) | |
download | emacs-83e2e961b013fe086072fd8dbc7eb8d17cc586d1.tar.gz |
Fix reading faces with a default value that is a symbol
* lisp/faces.el (read-face-name): Don't try to intern face if it
is already a symbol.
-rw-r--r-- | lisp/faces.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/faces.el b/lisp/faces.el index 1ada05a7b8b..2d4b7761be6 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -1148,13 +1148,18 @@ returned. Otherwise, DEFAULT is returned verbatim." nil t nil 'face-name-history default)) ;; Ignore elements that are not faces ;; (for example, because DEFAULT was "all faces") - (if (facep face) (push (intern face) faces))) + (if (facep face) (push (if (stringp face) + (intern face) + face) + faces))) (nreverse faces)) (let ((face (completing-read prompt (completion-table-in-turn nonaliasfaces aliasfaces) nil t nil 'face-name-history defaults))) - (if (facep face) (intern face))))))) + (when (facep face) (if (stringp face) + (intern face) + face))))))) ;; Not defined without X, but behind window-system test. (defvar x-bitmap-file-path) |