Function: inverse-add-mode-abbrev
inverse-add-mode-abbrev is an interactive and byte-compiled function
defined in abbrev.el.gz.
Signature
(inverse-add-mode-abbrev N)
Documentation
Define the word before point as a mode-specific abbreviation.
With prefix argument N, define the Nth word before point as the abbreviation. Negative N means use the Nth word after point.
If only-global-abbrevs is non-nil, this command defines a
global (mode-independent) abbrev instead of a mode-specific one.
This command reads the expansion from the minibuffer, defines the abbrev, and then expands the abbreviation in the current buffer.
See also add-mode-abbrev, which performs the opposite task:
if the expansion is already in the buffer, use that command
to define an abbrev by specifying the abbreviation in the minibuffer.
Probably introduced at or before Emacs version 19.20.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/abbrev.el.gz
(defun inverse-add-mode-abbrev (n)
"Define the word before point as a mode-specific abbreviation.
With prefix argument N, define the Nth word before point as the
abbreviation. Negative N means use the Nth word after point.
If `only-global-abbrevs' is non-nil, this command defines a
global (mode-independent) abbrev instead of a mode-specific one.
This command reads the expansion from the minibuffer, defines the
abbrev, and then expands the abbreviation in the current buffer.
See also `add-mode-abbrev', which performs the opposite task:
if the expansion is already in the buffer, use that command
to define an abbrev by specifying the abbreviation in the minibuffer."
(interactive "p")
(inverse-add-abbrev
(if only-global-abbrevs
global-abbrev-table
(or local-abbrev-table
(error "No per-mode abbrev table")))
"Mode" n))