From 365636dc53147e9a3192f3a19f0b2f176fa1db56 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 17 Jun 1995 23:53:53 +0000 Subject: [PATCH] (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. --- lisp/startup.el | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/lisp/startup.el b/lisp/startup.el index 9b73e40a59d..6b636f54516 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -295,19 +295,20 @@ specified by the LC_ALL, LC_CTYPE and LANG environment variables.") (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 @@ specified by the LC_ALL, LC_CTYPE and LANG environment variables.") (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 -- 2.39.2