Function: prepare-abbrev-list-buffer
prepare-abbrev-list-buffer is a byte-compiled function defined in
abbrev.el.gz.
Signature
(prepare-abbrev-list-buffer &optional LOCAL)
Documentation
Return buffer listing abbreviations and expansions for each abbrev table.
If LOCAL is non-nil, include in the buffer only the local abbrevs.
Source Code
;; Defined in /usr/src/emacs/lisp/abbrev.el.gz
(defun prepare-abbrev-list-buffer (&optional local)
"Return buffer listing abbreviations and expansions for each abbrev table.
If LOCAL is non-nil, include in the buffer only the local abbrevs."
(let ((local-table local-abbrev-table))
(with-current-buffer (get-buffer-create "*Abbrevs*")
(erase-buffer)
(if local
(insert-abbrev-table-description
(abbrev-table-name local-table) t)
(let (empty-tables)
(dolist (table abbrev-table-name-list)
(if (abbrev-table-empty-p (symbol-value table))
(push table empty-tables)
(insert-abbrev-table-description table t)))
(dolist (table (nreverse empty-tables))
(insert-abbrev-table-description table t)))
;; Note: `list-abbrevs' can display only local abbrevs, in
;; which case editing could lose abbrevs of other tables.
;; Thus enter `edit-abbrevs-mode' only if LOCAL is nil.
(edit-abbrevs-mode))
(goto-char (point-min))
(set-buffer-modified-p nil)
(current-buffer))))