]> code.delx.au - gnu-emacs/blobdiff - lisp/faces.el
Remove ": ?" from the read-face-name prompt
[gnu-emacs] / lisp / faces.el
index 7bd8107066a97d46c24fd2fbc9dbc1c0f5d92f6e..1b97093a8c4bbd376d8472a78043ee004a4d01e1 100644 (file)
@@ -1004,6 +1004,10 @@ a single face name."
     ;; to define DEFAULT if MULTIPLE is nil.
     (setq default (car (split-string default crm-separator t))))
 
+  ;; Older versions of `read-face-name' did not append ": " to the
+  ;; prompt, so there are third party libraries that have that in the
+  ;; prompt.  If so, remove it.
+  (setq prompt (replace-regexp-in-string ": ?\\'" "" prompt))
   (let ((prompt (if default
                     (format-message "%s (default `%s'): " prompt default)
                   (format "%s: " prompt)))