]> git.eshelyaron.com Git - emacs.git/commitdiff
(derived-mode-set-keymap): Cope if old-map is nil.
authorRichard M. Stallman <rms@gnu.org>
Thu, 20 Jul 1995 17:42:55 +0000 (17:42 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 20 Jul 1995 17:42:55 +0000 (17:42 +0000)
lisp/derived.el

index a1cfe8485f8e94b2eae26074c7a64051a01638e3..36bf14281257086de6d6c2510f6bac4d0093a7e7 100644 (file)
@@ -255,8 +255,9 @@ which more-or-less shadow
   (let* ((map-name (derived-mode-map-name mode))
         (new-map (eval map-name))
         (old-map (current-local-map)))
-    (if (get map-name 'derived-mode-unmerged)
-       (derived-mode-merge-keymaps old-map new-map))
+    (and old-map
+        (get map-name 'derived-mode-unmerged)
+        (derived-mode-merge-keymaps old-map new-map))
     (put map-name 'derived-mode-unmerged nil)
     (use-local-map new-map)))