diff options
| author | Chong Yidong | 2012-11-23 15:56:27 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-11-23 15:56:27 +0800 |
| commit | bccffa83747ae14e9a45779be7e8e570f8d70be5 (patch) | |
| tree | 475532590c8c51a12ee80dc70ce40c07f2f78ae8 | |
| parent | 8654a41b44c8fe925af2b10378faa09909699240 (diff) | |
| download | emacs-bccffa83747ae14e9a45779be7e8e570f8d70be5.tar.gz emacs-bccffa83747ae14e9a45779be7e8e570f8d70be5.zip | |
* faces.el (color-defined-p): Doc fix.
Fixes: debbugs:12853
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/faces.el | 36 |
2 files changed, 30 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6222c9d0237..a020790e4fd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2012-11-23 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * faces.el (color-defined-p): Doc fix (Bug#12853). | ||
| 4 | |||
| 1 | 2012-11-23 Juri Linkov <juri@jurta.org> | 5 | 2012-11-23 Juri Linkov <juri@jurta.org> |
| 2 | 6 | ||
| 3 | * wdired.el: Revert 2012-10-17 change partly and replace it with | 7 | * wdired.el: Revert 2012-10-17 change partly and replace it with |
diff --git a/lisp/faces.el b/lisp/faces.el index 9e0ca962499..71e8a17f6ef 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -926,13 +926,25 @@ of the default face. Value is FACE." | |||
| 926 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 926 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 927 | 927 | ||
| 928 | (defun read-face-name (prompt &optional default multiple) | 928 | (defun read-face-name (prompt &optional default multiple) |
| 929 | "Read a face, defaulting to the face or faces on the char after point. | 929 | "Read a face, defaulting to the face or faces at point. |
| 930 | If it has the property `read-face-name', that overrides the `face' property. | 930 | If the text at point has the property `read-face-name', that |
| 931 | PROMPT should be a string that describes what the caller will do with the face; | 931 | overrides the `face' property for determining the default. |
| 932 | it should not end in a space. | 932 | |
| 933 | PROMPT should be a string that describes what the caller will do | ||
| 934 | with the face; it should not end in a space. | ||
| 935 | |||
| 936 | |||
| 937 | This function uses `completing-read-multiple' with \",\" as the | ||
| 938 | separator character, i.e. | ||
| 939 | |||
| 940 | |||
| 941 | |||
| 942 | |||
| 943 | |||
| 933 | The optional argument DEFAULT provides the value to display in the | 944 | The optional argument DEFAULT provides the value to display in the |
| 934 | minibuffer prompt that is returned if the user just types RET | 945 | minibuffer prompt that is returned if the user just types RET |
| 935 | unless DEFAULT is a string (in which case nil is returned). | 946 | unless DEFAULT is a string (in which case nil is returned). |
| 947 | |||
| 936 | If MULTIPLE is non-nil, return a list of faces (possibly only one). | 948 | If MULTIPLE is non-nil, return a list of faces (possibly only one). |
| 937 | Otherwise, return a single face." | 949 | Otherwise, return a single face." |
| 938 | (let ((faceprop (or (get-char-property (point) 'read-face-name) | 950 | (let ((faceprop (or (get-char-property (point) 'read-face-name) |
| @@ -1689,12 +1701,16 @@ If FRAME is nil, that stands for the selected frame." | |||
| 1689 | (declare-function xw-color-defined-p "xfns.c" (color &optional frame)) | 1701 | (declare-function xw-color-defined-p "xfns.c" (color &optional frame)) |
| 1690 | 1702 | ||
| 1691 | (defun color-defined-p (color &optional frame) | 1703 | (defun color-defined-p (color &optional frame) |
| 1692 | "Return non-nil if color COLOR is supported on frame FRAME. | 1704 | "Return non-nil if COLOR is supported on frame FRAME. |
| 1693 | If FRAME is omitted or nil, use the selected frame. | 1705 | COLOR should be a string naming a color (e.g. \"white\"), or a |
| 1694 | If COLOR is the symbol `unspecified' or one of the strings | 1706 | string specifying a color's RGB components (e.g. \"#ff12ec\"), or |
| 1695 | \"unspecified-fg\" or \"unspecified-bg\", the value is nil." | 1707 | the symbol `unspecified'. |
| 1696 | (if (member color '(unspecified "unspecified-bg" "unspecified-fg")) | 1708 | |
| 1697 | nil | 1709 | This function returns nil if COLOR is the symbol `unspecified', |
| 1710 | or one of the strings \"unspecified-fg\" or \"unspecified-bg\". | ||
| 1711 | |||
| 1712 | If FRAME is omitted or nil, use the selected frame." | ||
| 1713 | (unless (member color '(unspecified "unspecified-bg" "unspecified-fg")) | ||
| 1698 | (if (member (framep (or frame (selected-frame))) '(x w32 ns)) | 1714 | (if (member (framep (or frame (selected-frame))) '(x w32 ns)) |
| 1699 | (xw-color-defined-p color frame) | 1715 | (xw-color-defined-p color frame) |
| 1700 | (numberp (tty-color-translate color frame))))) | 1716 | (numberp (tty-color-translate color frame))))) |