From f34e6918388a3cf48ec459b5ba6388fefe386ecd Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 20 Jul 1995 17:42:55 +0000 Subject: [PATCH] (derived-mode-set-keymap): Cope if old-map is nil. --- lisp/derived.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/derived.el b/lisp/derived.el index a1cfe8485f8..36bf1428125 100644 --- a/lisp/derived.el +++ b/lisp/derived.el @@ -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))) -- 2.39.2