Mercurial > emacs
diff lisp/faces.el @ 83241:3dcba0bc766b
Merged in changes from CVS trunk. (Long time no see!) :-)
Patches applied:
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-83
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-84
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-1
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-2
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-3
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-4
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-5
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-6
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-7
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-8
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-9
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-10
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-11
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-12
Remove "-face" suffix from lazy-highlight face name
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-13
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-14
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-15
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-16
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-17
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-18
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-19
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-20
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-21
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-22
<no summary provided>
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-23
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-24
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-25
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-26
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-27
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-28
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-29
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-30
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-31
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-32
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-33
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-34
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-35
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-36
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-37
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-38
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-39
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-40
Fix regressions from latest reftex update
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-41
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-42
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-43
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-44
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-45
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-46
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-47
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-48
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-49
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-50
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-51
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-52
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-53
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-54
Update from CVS: lisp/cus-start.el (all): Add `undo-outer-limit'.
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-55
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-56
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-57
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-58
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-59
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-60
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-61
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-62
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-63
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-64
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-65
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-66
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-67
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-68
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-69
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-70
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-71
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-72
src/dispextern.h (xassert): Enable unconditionally.
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-73
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-74
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-75
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--base-0
tag of miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-82
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-1
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-2
Merge from miles@gnu.org--gnu-2004
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-3
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-4
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-5
Update from CVS: exi/gnus-faq.texi ([4.1]): Typo.
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-6
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-7
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-8
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-9
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-10
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-11
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-281
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Thu, 03 Feb 2005 23:28:36 +0000 |
parents | 025da3ba778e d7da3e10bfef |
children | 89ac10c67e45 |
line wrap: on
line diff
--- a/lisp/faces.el Thu Feb 03 22:58:27 2005 +0000 +++ b/lisp/faces.el Thu Feb 03 23:28:36 2005 +0000 @@ -730,7 +730,9 @@ (defun set-face-background (face color &optional frame) "Change the background color of face FACE to COLOR (a string). FRAME nil or not specified means change face on all frames. -When called interactively, prompt for the face and color." +COLOR can be a system-defined color name (see `list-colors-display') +or a hex spec of the form #RRGGBB. +When called interactively, prompts for the face and color." (interactive (read-face-and-attribute :background)) (set-face-attribute face frame :background (or color 'unspecified))) @@ -738,7 +740,9 @@ (defun set-face-foreground (face color &optional frame) "Change the foreground color of face FACE to COLOR (a string). FRAME nil or not specified means change face on all frames. -When called interactively, prompt for the face and color." +COLOR can be a system-defined color name (see `list-colors-display') +or a hex spec of the form #RRGGBB. +When called interactively, prompts for the face and color." (interactive (read-face-and-attribute :foreground)) (set-face-attribute face frame :foreground (or color 'unspecified))) @@ -1139,15 +1143,26 @@ ;; conflict with Lucid, which uses that name differently. (defvar help-xref-stack) -(defun list-faces-display () +(defun list-faces-display (&optional regexp) "List all faces, using the same sample text in each. The sample text is a string that comes from the variable -`list-faces-sample-text'." - (interactive) +`list-faces-sample-text'. + +If REGEXP is non-nil, list only those faces with names matching +this regular expression. When called interactively with a prefix +arg, prompt for a regular expression." + (interactive (list (and current-prefix-arg + (read-string "List faces matching regexp: ")))) (let ((faces (sort (face-list) #'string-lessp)) - (face nil) (frame (selected-frame)) disp-frame window face-name) + (when (> (length regexp) 0) + (setq faces + (delq nil + (mapcar (lambda (f) + (when (string-match regexp (symbol-name f)) + f)) + faces)))) (with-output-to-temp-buffer "*Faces*" (save-excursion (set-buffer standard-output) @@ -1160,9 +1175,7 @@ "\\[help-follow] on a face name to customize it\n" "or on its sample text for a description of the face.\n\n"))) (setq help-xref-stack nil) - (while faces - (setq face (car faces)) - (setq faces (cdr faces)) + (dolist (face faces) (setq face-name (symbol-name face)) (insert (format "%25s " face-name)) ;; Hyperlink to a customization buffer for the face. Using @@ -1204,6 +1217,7 @@ (copy-face (car faces) (car faces) frame disp-frame) (setq faces (cdr faces))))))) + (defun describe-face (face &optional frame) "Display the properties of face FACE on FRAME. Interactively, FACE defaults to the faces of the character after point