Function: add-global-abbrev

add-global-abbrev is an interactive and byte-compiled function defined in abbrev.el.gz.

Signature

(add-global-abbrev ARG)

Documentation

Define a global (all modes) abbrev whose expansion is last word before point.

Prefix argument ARG says how many words before point to use for the expansion; zero means the entire region is the expansion. A negative ARG means to undefine the specified abbrev.

This command reads the abbreviation from the minibuffer.

See also inverse-add-global-abbrev, which performs the opposite task: if the abbreviation is already in the buffer, use that command to define a global abbrev by specifying its expansion in the minibuffer.

Don't use this function in a Lisp program; use define-abbrev instead.

Probably introduced at or before Emacs version 19.20.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/abbrev.el.gz
(defun add-global-abbrev (arg)
  "Define a global (all modes) abbrev whose expansion is last word before point.
Prefix argument ARG says how many words before point to use for the expansion;
zero means the entire region is the expansion.
A negative ARG means to undefine the specified abbrev.

This command reads the abbreviation from the minibuffer.

See also `inverse-add-global-abbrev', which performs the opposite task:
if the abbreviation is already in the buffer, use that command to define
a global abbrev by specifying its expansion in the minibuffer.

Don't use this function in a Lisp program; use `define-abbrev' instead."
  (interactive "p")
  (add-abbrev global-abbrev-table "Global" arg))