]> git.eshelyaron.com Git - emacs.git/commitdiff
Clarify documentation of functions that use the default face
authorEli Zaretskii <eliz@gnu.org>
Fri, 6 Dec 2019 15:42:19 +0000 (17:42 +0200)
committerEli Zaretskii <eliz@gnu.org>
Fri, 6 Dec 2019 15:43:26 +0000 (17:43 +0200)
* lisp/simple.el (default-font-height, default-font-width)
(default-line-height): Say in the doc strings that the default
face these functions use is for the currently selected frame.

* doc/lispref/display.texi (Attribute Functions)
(Low-Level Font): Document more clearly the dependence of the
results of 'face-font', 'default-font-width', and
'default-font-height' on the frame's definition of the default
face.

doc/lispref/display.texi
lisp/simple.el

index 1f7cc93c9c490bba49a825745199183d491d23d5..fa81b2e95381b85b9cb8deceebc8491bcd5e38c5 100644 (file)
@@ -2893,7 +2893,7 @@ This function returns the name of the font of face @var{face}.
 
 If the optional argument @var{frame} is specified, it returns the name
 of the font of @var{face} for that frame.  If @var{frame} is omitted or
-@code{nil}, the selected frame is used.  And, in this case, if the
+@code{nil}, the selected frame is used.  In the latter case, if the
 optional third argument @var{character} is supplied, it returns the font
 name used for @var{character}.
 @end defun
@@ -3934,12 +3934,14 @@ was remapped.  @xref{Face Remapping}.
 
 @defun default-font-width
 This function returns the average width in pixels of the font used by
-the current buffer's default face.
+the current buffer's default face, as that face is defined for the
+selected frame.
 @end defun
 
 @defun default-font-height
 This function returns the height in pixels of the font used by the
-current buffer's default face.
+current buffer's default face, as that face is defined for the
+selected frame.
 @end defun
 
 @defun window-font-width &optional window face
index 5e4cd8f5bc0e1d612a7177004776e15b4a516c50..67ddab3d343fb8951962aabf424b2685da1dd6fa 100644 (file)
@@ -6194,7 +6194,9 @@ lines."
   "Return the height in pixels of the current buffer's default face font.
 
 If the default font is remapped (see `face-remapping-alist'), the
-function returns the height of the remapped face."
+function returns the height of the remapped face.
+This function uses the definition of the default face for the currently
+selected frame."
   (let ((default-font (face-font 'default)))
     (cond
      ((and (display-multi-font-p)
@@ -6209,7 +6211,9 @@ function returns the height of the remapped face."
   "Return the width in pixels of the current buffer's default face font.
 
 If the default font is remapped (see `face-remapping-alist'), the
-function returns the width of the remapped face."
+function returns the width of the remapped face.
+This function uses the definition of the default face for the currently
+selected frame."
   (let ((default-font (face-font 'default)))
     (cond
      ((and (display-multi-font-p)
@@ -6228,7 +6232,9 @@ function returns the width of the remapped face."
   "Return the pixel height of current buffer's default-face text line.
 
 The value includes `line-spacing', if any, defined for the buffer
-or the frame."
+or the frame.
+This function uses the definition of the default face for the currently
+selected frame."
   (let ((dfh (default-font-height))
        (lsp (if (display-graphic-p)
                 (or line-spacing