Function: text-scale-mode
text-scale-mode is an interactive and byte-compiled function defined
in face-remap.el.gz.
Signature
(text-scale-mode &optional ARG)
Documentation
Minor mode for displaying buffer text in a larger/smaller font.
The amount of scaling is determined by the variable
text-scale-mode-amount: one step scales the global default
face size by the value of the variable text-scale-mode-step
(a negative amount shrinks the text).
The text-scale-increase, text-scale-decrease, and
text-scale-set functions may be used to interactively modify
the variable text-scale-mode-amount (they also enable or
disable text-scale-mode(var)/text-scale-mode(fun) as necessary).
If text-scale-remap-header-line is non-nil, also change
the font size of the header line.
This is a minor mode. If called interactively, toggle the Text-Scale
mode mode. If the prefix argument is positive, enable the mode, and if
it is zero or negative, disable the mode.
If called from Lisp, toggle the mode if ARG is toggle. Enable the
mode if ARG is nil, omitted, or is a positive number. Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
evaluate the variable text-scale-mode(var)/text-scale-mode(fun).
The mode's hook is called both when the mode is enabled and when it is disabled.
Probably introduced at or before Emacs version 23.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/face-remap.el.gz
(define-minor-mode text-scale-mode
"Minor mode for displaying buffer text in a larger/smaller font.
The amount of scaling is determined by the variable
`text-scale-mode-amount': one step scales the global default
face size by the value of the variable `text-scale-mode-step'
\(a negative amount shrinks the text).
The `text-scale-increase', `text-scale-decrease', and
`text-scale-set' functions may be used to interactively modify
the variable `text-scale-mode-amount' (they also enable or
disable `text-scale-mode' as necessary).
If `text-scale-remap-header-line' is non-nil, also change
the font size of the header line."
:lighter (" " text-scale-mode-lighter)
(face-remap--clear-remappings)
(setq text-scale-mode-lighter
(format (if (>= text-scale-mode-amount 0) "+%d" "%d")
text-scale-mode-amount))
(when text-scale-mode
(face-remap--remap-face 'default)
(when text-scale-remap-header-line
(face-remap--remap-face 'header-line)))
(force-window-update (current-buffer)))