changeset 11023:498940aefc37

(mouse-major-mode-menu): Avoid confusing error message when there's no current local map.
author Karl Heuer <kwzh@gnu.org>
date Wed, 15 Mar 1995 21:30:49 +0000
parents f9e9533d0f4c
children 636d0fa5a920
files lisp/mouse.el
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mouse.el	Wed Mar 15 20:20:39 1995 +0000
+++ b/lisp/mouse.el	Wed Mar 15 21:30:49 1995 +0000
@@ -52,7 +52,8 @@
     (define-key newmap (vector (car event))
       (nconc (make-sparse-keymap "Menu")
 	     (mouse-major-mode-menu-1
-	      (lookup-key (current-local-map) [menu-bar]))))
+	      (and (current-local-map)
+		   (lookup-key (current-local-map) [menu-bar])))))
     (mouse-major-mode-menu-compute-equiv-keys newmap)
     (command-execute
      ;; Make NEWMAP override the usual definition