diff options
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/abbrev.el | 12 |
1 files changed, 12 insertions, 0 deletions
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." | |||
| 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 | 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)) | ||
| 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." |