Function: edit-abbrevs

edit-abbrevs is an interactive and byte-compiled function defined in abbrev.el.gz.

Signature

(edit-abbrevs)

Documentation

Alter abbrev definitions by editing the list of abbrevs.

This selects a buffer containing the list of abbrev definitions with point located in the abbrev table for the current buffer, and turns on edit-abbrevs-mode in the buffer with the list of abbrevs.

You can edit the abbrevs and type C-c C-c (edit-abbrevs-redefine) to redefine abbrevs according to your editing.

The abbrevs editing buffer contains a header line for each abbrev table, which is the abbrev table name in parentheses.

The header line is followed by one line per abbrev in that table:

    NAME USECOUNT EXPANSION HOOK

where NAME and EXPANSION are strings with quotes, USECOUNT is an integer, and HOOK is any valid function that may be omitted (it is usually omitted).

View in manual

Probably introduced at or before Emacs version 29.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/abbrev.el.gz
(defun edit-abbrevs ()
  "Alter abbrev definitions by editing the list of abbrevs.
This selects a buffer containing the list of abbrev definitions
with point located in the abbrev table for the current buffer, and
turns on `edit-abbrevs-mode' in the buffer with the list of abbrevs.

You can edit the abbrevs and type \\<edit-abbrevs-mode-map>\\[edit-abbrevs-redefine] \
to redefine abbrevs
according to your editing.

The abbrevs editing buffer contains a header line for each
abbrev table, which is the abbrev table name in parentheses.

The header line is followed by one line per abbrev in that table:

    NAME   USECOUNT   EXPANSION   HOOK

where NAME and EXPANSION are strings with quotes,
USECOUNT is an integer, and HOOK is any valid function
that may be omitted (it is usually omitted)."
  (interactive)
  (let ((table-name (abbrev-table-name local-abbrev-table)))
    (switch-to-buffer (prepare-abbrev-list-buffer))
    (when (and table-name
               (search-forward
                (concat "(" (symbol-name table-name) ")\n\n") nil t))
      (goto-char (match-end 0)))))