Function: universal-argument

universal-argument is an interactive and byte-compiled function defined in simple.el.gz.

Signature

(universal-argument)

Documentation

Begin a numeric argument for the following command.

Digits or minus sign following C-u (universal-argument) make up the numeric argument. C-u (universal-argument) following the digits or minus sign ends the argument. C-u (universal-argument) without digits or minus sign provides 4 as argument. Repeating C-u (universal-argument) without digits or minus sign
 multiplies the argument by 4 each time.
For some commands, just C-u (universal-argument) by itself serves as a flag that is different in effect from any particular numeric argument. These commands include C-SPC (set-mark-command) and M-x start-kbd-macro (start-kbd-macro).

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/simple.el.gz
(defun universal-argument ()
  "Begin a numeric argument for the following command.
Digits or minus sign following \\[universal-argument] make up the numeric argument.
\\[universal-argument] following the digits or minus sign ends the argument.
\\[universal-argument] without digits or minus sign provides 4 as argument.
Repeating \\[universal-argument] without digits or minus sign
 multiplies the argument by 4 each time.
For some commands, just \\[universal-argument] by itself serves as a flag
that is different in effect from any particular numeric argument.
These commands include \\[set-mark-command] and \\[start-kbd-macro]."
  (interactive)
  (prefix-command-preserve-state)
  (setq prefix-arg (list 4))
  (universal-argument--mode))