]> git.eshelyaron.com Git - emacs.git/commitdiff
(derived-mode-merge-abbrev-tables):
authorRichard M. Stallman <rms@gnu.org>
Sun, 5 Jun 1994 15:17:16 +0000 (15:17 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 5 Jun 1994 15:17:16 +0000 (15:17 +0000)
Do nothing if OLD is nil.

lisp/derived.el

index 90983cd820ddcb8f3b4ccb72604982bb602c34e1..83b114c0f1f89c66c09d492d5a8a0a3165bcda31 100644 (file)
@@ -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)