Mercurial > emacs
comparison lisp/faces.el @ 44896:fc1fdc78c3eb
(read-face-name): Format the prompt correctly when there's no default.
author | Miles Bader <miles@gnu.org> |
---|---|
date | Sat, 27 Apr 2002 04:56:49 +0000 |
parents | 235cc7208807 |
children | 829beb9a6a4b |
comparison
equal
deleted
inserted
replaced
44895:38d4beae98c8 | 44896:fc1fdc78c3eb |
---|---|
877 (completing-read | 877 (completing-read |
878 (if (or faces string-describing-default) | 878 (if (or faces string-describing-default) |
879 (format "%s (default %s): " prompt | 879 (format "%s (default %s): " prompt |
880 (if faces (mapconcat 'symbol-name faces ", ") | 880 (if faces (mapconcat 'symbol-name faces ", ") |
881 string-describing-default)) | 881 string-describing-default)) |
882 prompt) | 882 (format "%s: " prompt)) |
883 obarray 'custom-facep t)) | 883 obarray 'custom-facep t)) |
884 ;; Canonicalize the output. | 884 ;; Canonicalize the output. |
885 (output | 885 (output |
886 (if (equal input "") | 886 (if (equal input "") |
887 faces | 887 faces |
890 input)))) | 890 input)))) |
891 ;; Return either a list of faces or just one face. | 891 ;; Return either a list of faces or just one face. |
892 (if multiple | 892 (if multiple |
893 output | 893 output |
894 (car output))))) | 894 (car output))))) |
895 | |
896 | |
897 | 895 |
898 | 896 |
899 (defun face-valid-attribute-values (attribute &optional frame) | 897 (defun face-valid-attribute-values (attribute &optional frame) |
900 "Return valid values for face attribute ATTRIBUTE. | 898 "Return valid values for face attribute ATTRIBUTE. |
901 The optional argument FRAME is used to determine available fonts | 899 The optional argument FRAME is used to determine available fonts |