; Improve documentation of text-scale adjust commands

* lisp/face-remap.el (global-text-scale-adjust)
(text-scale-adjust): Doc fixes.  (Bug#59122)
This commit is contained in:
Eli Zaretskii 2022-11-13 08:56:35 +02:00
parent 47b377f64b
commit 695dbd3db4

View file

@ -367,7 +367,7 @@ See `text-scale-increase' for more details."
;;;###autoload
(defun text-scale-adjust (inc)
"Adjust the font size in the current buffer by INC steps.
INC may be passed as a numeric prefix argument.
Interactively, INC is the prefix numeric argument, and defaults to 1.
The actual adjustment made depends on the final component of the
keybinding used to invoke the command, with all modifiers removed:
@ -377,13 +377,14 @@ keybinding used to invoke the command, with all modifiers removed:
\\`0' Reset the font size to the global default
After adjusting, continue to read input events and further adjust
the font size as long as the input event read
\(with all modifiers removed) is one of the above characters.
the font size as long as the input event (with all modifiers removed)
is one of the above characters.
Each step scales the height of the default face by the variable
`text-scale-mode-step' (a negative number of steps decreases the
height by the same amount). As a special case, an argument of 0
will remove any scaling currently active.
Each step scales the height of the default face by the factor that
is the value of `text-scale-mode-step' (a negative number of steps
decreases the height by that factor). As a special case, an argument
of 0 will remove any scaling currently active, thus resetting the
font size to the original value.
This command is a special-purpose wrapper around the
`text-scale-increase' command which makes repetition convenient
@ -467,19 +468,22 @@ the `cdr' has the maximum font size, in units of 1/10 pt."
;;;###autoload (define-key ctl-x-map [(control meta ?0)] 'global-text-scale-adjust)
;;;###autoload
(defun global-text-scale-adjust (increment)
"Globally adjust the font size by INCREMENT.
"Change (a.k.a. \"adjust\") the font size of all faces by INCREMENT.
Interactively, INCREMENT may be passed as a numeric prefix argument.
Interactively, INCREMENT is the prefix numeric argument, and defaults
to 1. Positive values of INCREMENT increase the font size, negative
values decrease it.
The adjustment made depends on the final component of the key binding
used to invoke the command, with all modifiers removed:
When you invoke this command, it performs the initial change of the
font size, and after that allows further changes by typing one of the
following keys immediately after invoking the command:
\\`+', \\`=' Globally increase the height of the default face
\\`-' Globally decrease the height of the default face
\\`0' Globally reset the height of the default face
After adjusting, further adjust the font size as long as the key,
with all modifiers removed, is one of the above characters.
(The change of the font size produced by these keys depends on the
final component of the key sequence, with all modifiers removed.)
Buffer-local face adjustments have higher priority than global
face adjustments.