diff options
| author | Eli Zaretskii | 2022-05-27 09:21:31 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2022-05-27 09:21:31 +0300 |
| commit | bd5c95a90d85cb2ec48c53e654fa233c13abd7ac (patch) | |
| tree | 9d07c5ea2615a8092525967713e30e9ffb4c7553 | |
| parent | 9283508fb282cbd51b9376f17b5347246daf74f2 (diff) | |
| download | emacs-bd5c95a90d85cb2ec48c53e654fa233c13abd7ac.tar.gz emacs-bd5c95a90d85cb2ec48c53e654fa233c13abd7ac.zip | |
Mention "unspecified-fg" and "unspecified-bg" in some doc strings
* lisp/faces.el (face-foreground, face-background)
(foreground-color-at-point, background-color-at-point):
* lisp/color.el (color-name-to-rgb): Mention "unspecified-fg" and
"unspecified-bg" pseudo-colors on TTY frames. (Bug#55623)
| -rw-r--r-- | lisp/color.el | 4 | ||||
| -rw-r--r-- | lisp/faces.el | 16 |
2 files changed, 18 insertions, 2 deletions
diff --git a/lisp/color.el b/lisp/color.el index 0fe663d97a7..ef3a2f58362 100644 --- a/lisp/color.el +++ b/lisp/color.el | |||
| @@ -39,6 +39,10 @@ | |||
| 39 | COLOR should be a color name (e.g. \"white\") or an RGB triplet | 39 | COLOR should be a color name (e.g. \"white\") or an RGB triplet |
| 40 | string (e.g. \"#ffff1122eecc\"). | 40 | string (e.g. \"#ffff1122eecc\"). |
| 41 | 41 | ||
| 42 | COLOR can also be the symbol `unspecified' or one of the strings | ||
| 43 | \"unspecified-fg\" or \"unspecified-bg\", in which case the | ||
| 44 | return value is nil. | ||
| 45 | |||
| 42 | Normally the return value is a list of three floating-point | 46 | Normally the return value is a list of three floating-point |
| 43 | numbers, (RED GREEN BLUE), each between 0.0 and 1.0 inclusive. | 47 | numbers, (RED GREEN BLUE), each between 0.0 and 1.0 inclusive. |
| 44 | 48 | ||
diff --git a/lisp/faces.el b/lisp/faces.el index 3bd1e5db6f8..e93d8c7af85 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -515,6 +515,9 @@ FACES may be either a single face or a list of faces. | |||
| 515 | 515 | ||
| 516 | (defun face-foreground (face &optional frame inherit) | 516 | (defun face-foreground (face &optional frame inherit) |
| 517 | "Return the foreground color name of FACE, or nil if unspecified. | 517 | "Return the foreground color name of FACE, or nil if unspecified. |
| 518 | On TTY frames, the returned color name can be \"unspecified-fg\", | ||
| 519 | which stands for the unknown default foreground color of the display | ||
| 520 | where the frame is displayed. | ||
| 518 | If the optional argument FRAME is given, report on face FACE in that frame. | 521 | If the optional argument FRAME is given, report on face FACE in that frame. |
| 519 | If FRAME is t, report on the defaults for face FACE (for new frames). | 522 | If FRAME is t, report on the defaults for face FACE (for new frames). |
| 520 | If FRAME is omitted or nil, use the selected frame. | 523 | If FRAME is omitted or nil, use the selected frame. |
| @@ -536,6 +539,9 @@ merging with the `default' face (which is always completely specified)." | |||
| 536 | 539 | ||
| 537 | (defun face-background (face &optional frame inherit) | 540 | (defun face-background (face &optional frame inherit) |
| 538 | "Return the background color name of FACE, or nil if unspecified. | 541 | "Return the background color name of FACE, or nil if unspecified. |
| 542 | On TTY frames, the returned color name can be \"unspecified-bg\", | ||
| 543 | which stands for the unknown default background color of the display | ||
| 544 | where the frame is displayed. | ||
| 539 | If the optional argument FRAME is given, report on face FACE in that frame. | 545 | If the optional argument FRAME is given, report on face FACE in that frame. |
| 540 | If FRAME is t, report on the defaults for face FACE (for new frames). | 546 | If FRAME is t, report on the defaults for face FACE (for new frames). |
| 541 | If FRAME is omitted or nil, use the selected frame. | 547 | If FRAME is omitted or nil, use the selected frame. |
| @@ -2061,11 +2067,17 @@ unnamed faces (e.g, `foreground-color')." | |||
| 2061 | (face-attribute 'default attribute)))) | 2067 | (face-attribute 'default attribute)))) |
| 2062 | 2068 | ||
| 2063 | (defun foreground-color-at-point () | 2069 | (defun foreground-color-at-point () |
| 2064 | "Return the foreground color of the character after point." | 2070 | "Return the foreground color of the character after point. |
| 2071 | On TTY frames, the returned color name can be \"unspecified-fg\", | ||
| 2072 | which stands for the unknown default foreground color of the | ||
| 2073 | display where the frame is displayed." | ||
| 2065 | (faces--attribute-at-point :foreground 'foreground-color)) | 2074 | (faces--attribute-at-point :foreground 'foreground-color)) |
| 2066 | 2075 | ||
| 2067 | (defun background-color-at-point () | 2076 | (defun background-color-at-point () |
| 2068 | "Return the background color of the character after point." | 2077 | "Return the background color of the character after point. |
| 2078 | On TTY frames, the returned color name can be \"unspecified-bg\", | ||
| 2079 | which stands for the unknown default background color of the | ||
| 2080 | display where the frame is displayed." | ||
| 2069 | (faces--attribute-at-point :background 'background-color)) | 2081 | (faces--attribute-at-point :background 'background-color)) |
| 2070 | 2082 | ||
| 2071 | 2083 | ||