Mercurial > emacs
comparison lisp/facemenu.el @ 11372:874b91f4adc4
(facemenu-read-color): Don't ignore PROMPT arg. Make arg optional.
(facemenu-unlisted-faces): Add font-lock faces to default value.
author | Boris Goldowsky <boris@gnu.org> |
---|---|
date | Tue, 11 Apr 1995 15:56:53 +0000 |
parents | 4d2a2fe1d8d7 |
children | 9fa2f8b87890 |
comparison
equal
deleted
inserted
replaced
11371:b945fc51a3b6 | 11372:874b91f4adc4 |
---|---|
122 "Where in the menu to insert newly-created faces. | 122 "Where in the menu to insert newly-created faces. |
123 This should be nil to put them at the top of the menu, or t to put them | 123 This should be nil to put them at the top of the menu, or t to put them |
124 just before \"Other\" at the end.") | 124 just before \"Other\" at the end.") |
125 | 125 |
126 (defvar facemenu-unlisted-faces | 126 (defvar facemenu-unlisted-faces |
127 '(modeline region secondary-selection highlight scratch-face) | 127 '(modeline region secondary-selection highlight scratch-face |
128 font-lock-comment-face font-lock-string-face font-lock-keyword-face | |
129 font-lock-function-name-face font-lock-variable-name-face | |
130 font-lock-type-face font-lock-reference-face) | |
128 "List of faces not to include in the Face menu. | 131 "List of faces not to include in the Face menu. |
129 Set this before loading facemenu.el, or call `facemenu-update' after | 132 Set this before loading facemenu.el, or call `facemenu-update' after |
130 changing it. | 133 changing it. |
131 | 134 |
132 If this variable is t, no faces will be added to the menu. This is useful for | 135 If this variable is t, no faces will be added to the menu. This is useful for |
373 (princ (format "%-20s %S\n" | 376 (princ (format "%-20s %S\n" |
374 (car props) (car (cdr props)))) | 377 (car props) (car (cdr props)))) |
375 (setq props (cdr (cdr props)))))))) | 378 (setq props (cdr (cdr props)))))))) |
376 | 379 |
377 ;;;###autoload | 380 ;;;###autoload |
378 (defun facemenu-read-color (prompt) | 381 (defun facemenu-read-color (&optional prompt) |
379 "Read a color using the minibuffer." | 382 "Read a color using the minibuffer." |
380 (let ((col (completing-read (or "Color: ") | 383 (let ((col (completing-read (or prompt "Color: ") |
381 (or facemenu-color-alist | 384 (or facemenu-color-alist |
382 (if (eq 'x window-system) | 385 (if (eq 'x window-system) |
383 (mapcar 'list (x-defined-colors)))) | 386 (mapcar 'list (x-defined-colors)))) |
384 nil t))) | 387 nil t))) |
385 (if (equal "" col) | 388 (if (equal "" col) |