diff options
author | Richard M. Stallman <rms@gnu.org> | 1994-06-05 15:17:16 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1994-06-05 15:17:16 +0000 |
commit | 1700d894bf4f6190368b55045e97c0415936ccaf (patch) | |
tree | bbf49c9ccc49a0fb3451b5c6581663e70465f7ca /lisp/derived.el | |
parent | fe3587586419aa7679cd8da2f32bf6e35ee9dbe0 (diff) | |
download | emacs-1700d894bf4f6190368b55045e97c0415936ccaf.tar.gz |
(derived-mode-merge-abbrev-tables):
Do nothing if OLD is nil.
Diffstat (limited to 'lisp/derived.el')
-rw-r--r-- | lisp/derived.el | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lisp/derived.el b/lisp/derived.el index 90983cd820d..83b114c0f1f 100644 --- a/lisp/derived.el +++ b/lisp/derived.el @@ -311,19 +311,19 @@ Where the new table already has an entry, nothing is copied from the old one." (aset new idx (aref old idx))) (setq idx (1+ idx))))) +;; Merge an old abbrev table into a new one. +;; This function requires internal knowledge of how abbrev tables work, +;; presuming that they are obarrays with the abbrev as the symbol, the expansion +;; as the value of the symbol, and the hook as the function definition. (defun derived-mode-merge-abbrev-tables (old new) - "Merge an old abbrev table into a new one. -This function requires internal knowledge of how abbrev tables work, -presuming that they are obarrays with the abbrev as the symbol, the expansion -as the value of the symbol, and the hook as the function definition. -This could well break with some future version of Gnu Emacs." - (mapatoms - (function - (lambda (symbol) - (or (intern-soft (symbol-name symbol) new) - (define-abbrev new (symbol-name symbol) - (symbol-value symbol) (symbol-function symbol))))) - old)) + (if old + (mapatoms + (function + (lambda (symbol) + (or (intern-soft (symbol-name symbol) new) + (define-abbrev new (symbol-name symbol) + (symbol-value symbol) (symbol-function symbol))))) + old))) (provide 'derived) |