changeset 7798:f627fbbd4524

(derived-mode-merge-abbrev-tables): Do nothing if OLD is nil.
author Richard M. Stallman <rms@gnu.org>
date Sun, 05 Jun 1994 15:17:16 +0000
parents f127eb11ea7f
children 1eb0d0f0f71b
files lisp/derived.el
diffstat 1 files changed, 12 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/derived.el	Sun Jun 05 12:43:42 1994 +0000
+++ b/lisp/derived.el	Sun Jun 05 15:17:16 1994 +0000
@@ -311,19 +311,19 @@
 	  (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)