aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2022-05-27 09:21:31 +0300
committerEli Zaretskii2022-05-27 09:21:31 +0300
commitbd5c95a90d85cb2ec48c53e654fa233c13abd7ac (patch)
tree9d07c5ea2615a8092525967713e30e9ffb4c7553
parent9283508fb282cbd51b9376f17b5347246daf74f2 (diff)
downloademacs-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.el4
-rw-r--r--lisp/faces.el16
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 @@
39COLOR should be a color name (e.g. \"white\") or an RGB triplet 39COLOR should be a color name (e.g. \"white\") or an RGB triplet
40string (e.g. \"#ffff1122eecc\"). 40string (e.g. \"#ffff1122eecc\").
41 41
42COLOR can also be the symbol `unspecified' or one of the strings
43\"unspecified-fg\" or \"unspecified-bg\", in which case the
44return value is nil.
45
42Normally the return value is a list of three floating-point 46Normally the return value is a list of three floating-point
43numbers, (RED GREEN BLUE), each between 0.0 and 1.0 inclusive. 47numbers, (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.
518On TTY frames, the returned color name can be \"unspecified-fg\",
519which stands for the unknown default foreground color of the display
520where the frame is displayed.
518If the optional argument FRAME is given, report on face FACE in that frame. 521If the optional argument FRAME is given, report on face FACE in that frame.
519If FRAME is t, report on the defaults for face FACE (for new frames). 522If FRAME is t, report on the defaults for face FACE (for new frames).
520If FRAME is omitted or nil, use the selected frame. 523If 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.
542On TTY frames, the returned color name can be \"unspecified-bg\",
543which stands for the unknown default background color of the display
544where the frame is displayed.
539If the optional argument FRAME is given, report on face FACE in that frame. 545If the optional argument FRAME is given, report on face FACE in that frame.
540If FRAME is t, report on the defaults for face FACE (for new frames). 546If FRAME is t, report on the defaults for face FACE (for new frames).
541If FRAME is omitted or nil, use the selected frame. 547If 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.
2071On TTY frames, the returned color name can be \"unspecified-fg\",
2072which stands for the unknown default foreground color of the
2073display 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.
2078On TTY frames, the returned color name can be \"unspecified-bg\",
2079which stands for the unknown default background color of the
2080display 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