]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/faces.el (read-face-name-sample-text): Add defconst (bug#53960).
authorJuri Linkov <juri@linkov.net>
Sun, 13 Feb 2022 18:44:14 +0000 (20:44 +0200)
committerJuri Linkov <juri@linkov.net>
Sun, 13 Feb 2022 18:44:14 +0000 (20:44 +0200)
(read-face-name): Use it instead of hard-coded string.

lisp/faces.el

index b765522914d60c3caf06d62b7b6f893af7e05903..3a434b3251c760ec6acedaae1c3d7270da4d087f 100644 (file)
@@ -1065,6 +1065,9 @@ of the default face.  Value is FACE."
 
 (defvar crm-separator) ; from crm.el
 
+(defconst read-face-name-sample-text "SAMPLE"
+  "Text string to display as the sample text for `read-face-name'.")
+
 (defun read-face-name (prompt &optional default multiple)
   "Read one or more face names, prompting with PROMPT.
 PROMPT should not end in a space or a colon.
@@ -1115,7 +1118,9 @@ returned.  Otherwise, DEFAULT is returned verbatim."
                (mapcar
                 (lambda (face)
                   (list face
-                        (concat (propertize "SAMPLE" 'face face) "\t")
+                        (concat (propertize read-face-name-sample-text
+                                            'face face)
+                                "\t")
                         ""))
                 faces))))
           aliasfaces nonaliasfaces faces)