Function: text-scale-set

text-scale-set is an autoloaded, interactive and byte-compiled function defined in face-remap.el.gz.

Signature

(text-scale-set LEVEL)

Documentation

Set the scale factor of the default face in the current buffer to LEVEL.

If LEVEL is non-zero, text-scale-mode(var)/text-scale-mode(fun) is enabled, otherwise it is disabled.

LEVEL is a number of steps, with 0 representing the default size. Each step scales the height of the default face by the variable text-scale-mode-step (a negative number decreases the height by the same amount).

View in manual

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/face-remap.el.gz
;;;###autoload
(defun text-scale-set (level)
  "Set the scale factor of the default face in the current buffer to LEVEL.
If LEVEL is non-zero, `text-scale-mode' is enabled, otherwise it is disabled.

LEVEL is a number of steps, with 0 representing the default size.
Each step scales the height of the default face by the variable
`text-scale-mode-step' (a negative number decreases the height by
the same amount)."
  (interactive "p")
  (setq text-scale-mode-amount
        (max (min level (text-scale-max-amount)) (text-scale-min-amount)))
  (text-scale-mode (if (zerop text-scale-mode-amount) -1 1)))