Mercurial > emacs
changeset 47424:472a93499802
(copy-abbrev-table): New function.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 12 Sep 2002 03:19:25 +0000 |
parents | eda3a96f644a |
children | 525668986222 |
files | lisp/abbrev.el |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/abbrev.el Thu Sep 12 03:14:50 2002 +0000 +++ b/lisp/abbrev.el Thu Sep 12 03:19:25 2002 +0000 @@ -74,6 +74,18 @@ (clear-abbrev-table (symbol-value (car tables))) (setq tables (cdr tables))))) +(defun copy-abbrev-table (table) + "Make a new abbrev-table with the same abbrevs as TABLE." + (let ((new-table (make-abbrev-table))) + (mapatoms + (lambda (symbol) + (define-abbrev new-table + (symbol-name symbol) + (symbol-value symbol) + (symbol-function symbol))) + table) + new-table)) + (defun insert-abbrevs () "Insert after point a description of all defined abbrevs. Mark is set after the inserted text."