From: Richard M. Stallman Date: Thu, 12 Sep 2002 03:19:25 +0000 (+0000) Subject: (copy-abbrev-table): New function. X-Git-Tag: ttn-vms-21-2-B4~13219 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ad9d51b2115f2bfdc4c7cd87c6c8c16cff0729b5;p=emacs.git (copy-abbrev-table): New function. --- diff --git a/lisp/abbrev.el b/lisp/abbrev.el index 25bfcf70585..8e6b3ae69d8 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el @@ -74,6 +74,18 @@ buffer." (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."