comparison lisp/abbrev.el @ 47424:472a93499802

(copy-abbrev-table): New function.
author Richard M. Stallman <rms@gnu.org>
date Thu, 12 Sep 2002 03:19:25 +0000
parents 099200f97432
children 07509eeb7745
comparison
equal deleted inserted replaced
47423:eda3a96f644a 47424:472a93499802
71 (interactive) 71 (interactive)
72 (let ((tables abbrev-table-name-list)) 72 (let ((tables abbrev-table-name-list))
73 (while tables 73 (while tables
74 (clear-abbrev-table (symbol-value (car tables))) 74 (clear-abbrev-table (symbol-value (car tables)))
75 (setq tables (cdr tables))))) 75 (setq tables (cdr tables)))))
76
77 (defun copy-abbrev-table (table)
78 "Make a new abbrev-table with the same abbrevs as TABLE."
79 (let ((new-table (make-abbrev-table)))
80 (mapatoms
81 (lambda (symbol)
82 (define-abbrev new-table
83 (symbol-name symbol)
84 (symbol-value symbol)
85 (symbol-function symbol)))
86 table)
87 new-table))
76 88
77 (defun insert-abbrevs () 89 (defun insert-abbrevs ()
78 "Insert after point a description of all defined abbrevs. 90 "Insert after point a description of all defined abbrevs.
79 Mark is set after the inserted text." 91 Mark is set after the inserted text."
80 (interactive) 92 (interactive)