changeset 12300:d2f3dd6083d2

(normal-top-level, command-line-1): Call precompute-menubar-bindings only if using x. (precompute-menubar-bindings): Don't check for x here. Set define-key-rebound-commands to t.
author Richard M. Stallman <rms@gnu.org>
date Sat, 17 Jun 1995 23:53:53 +0000
parents d4e2494f12cb
children 69f08a14593b
files lisp/startup.el
diffstat 1 files changed, 13 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/startup.el	Sat Jun 17 23:53:23 1995 +0000
+++ b/lisp/startup.el	Sat Jun 17 23:53:53 1995 +0000
@@ -295,19 +295,20 @@
 	(and window-setup-hook
 	     (run-hooks 'window-setup-hook))
 	(or menubar-bindings-done
-	    (precompute-menubar-bindings))))))
+	    (if (eq window-system 'x)
+		(precompute-menubar-bindings)))))))
 
 ;; Precompute the keyboard equivalents in the menu bar items.
 (defun precompute-menubar-bindings ()
-  (if (eq window-system 'x)
-      (let ((submap (lookup-key global-map [menu-bar])))
-	(while submap
-	  (and (consp (car submap))
-	       (symbolp (car (car submap)))
-	       (stringp (car-safe (cdr (car submap))))
-	       (keymapp (cdr (cdr (car submap))))
-	       (x-popup-menu nil (cdr (cdr (car submap)))))
-	  (setq submap (cdr submap))))))
+  (let ((submap (lookup-key global-map [menu-bar])))
+    (while submap
+      (and (consp (car submap))
+	   (symbolp (car (car submap)))
+	   (stringp (car-safe (cdr (car submap))))
+	   (keymapp (cdr (cdr (car submap))))
+	   (x-popup-menu nil (cdr (cdr (car submap)))))
+      (setq submap (cdr submap))))
+  (setq define-key-rebound-commands t))
 
 (defun command-line ()
   (setq command-line-default-directory default-directory)
@@ -590,7 +591,8 @@
 	     (setq window-setup-hook nil)
 	     ;; Do this now to avoid an annoying delay if the user
 	     ;; clicks the menu bar during the sit-for.
-	     (precompute-menubar-bindings)
+	     (if (eq window-system 'x)
+		 (precompute-menubar-bindings))
 	     (setq menubar-bindings-done t)
 	     (unwind-protect
 		 (progn