From ad9d51b2115f2bfdc4c7cd87c6c8c16cff0729b5 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 12 Sep 2002 03:19:25 +0000 Subject: [PATCH] (copy-abbrev-table): New function. --- lisp/abbrev.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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." -- 2.39.5