aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1995-06-17 23:53:53 +0000
committerRichard M. Stallman1995-06-17 23:53:53 +0000
commit365636dc53147e9a3192f3a19f0b2f176fa1db56 (patch)
treef05f32abd1ccc1f68f5e0cf42b340b10e9e1e915
parentf5263a5cfc5cb6f1ae2b8c32593e1d7c7e07d2f3 (diff)
downloademacs-365636dc53147e9a3192f3a19f0b2f176fa1db56.tar.gz
emacs-365636dc53147e9a3192f3a19f0b2f176fa1db56.zip
(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.
-rw-r--r--lisp/startup.el24
1 files 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.")
295 (and window-setup-hook 295 (and window-setup-hook
296 (run-hooks 'window-setup-hook)) 296 (run-hooks 'window-setup-hook))
297 (or menubar-bindings-done 297 (or menubar-bindings-done
298 (precompute-menubar-bindings)))))) 298 (if (eq window-system 'x)
299 (precompute-menubar-bindings)))))))
299 300
300;; Precompute the keyboard equivalents in the menu bar items. 301;; Precompute the keyboard equivalents in the menu bar items.
301(defun precompute-menubar-bindings () 302(defun precompute-menubar-bindings ()
302 (if (eq window-system 'x) 303 (let ((submap (lookup-key global-map [menu-bar])))
303 (let ((submap (lookup-key global-map [menu-bar]))) 304 (while submap
304 (while submap 305 (and (consp (car submap))
305 (and (consp (car submap)) 306 (symbolp (car (car submap)))
306 (symbolp (car (car submap))) 307 (stringp (car-safe (cdr (car submap))))
307 (stringp (car-safe (cdr (car submap)))) 308 (keymapp (cdr (cdr (car submap))))
308 (keymapp (cdr (cdr (car submap)))) 309 (x-popup-menu nil (cdr (cdr (car submap)))))
309 (x-popup-menu nil (cdr (cdr (car submap))))) 310 (setq submap (cdr submap))))
310 (setq submap (cdr submap)))))) 311 (setq define-key-rebound-commands t))
311 312
312(defun command-line () 313(defun command-line ()
313 (setq command-line-default-directory default-directory) 314 (setq command-line-default-directory default-directory)
@@ -590,7 +591,8 @@ specified by the LC_ALL, LC_CTYPE and LANG environment variables.")
590 (setq window-setup-hook nil) 591 (setq window-setup-hook nil)
591 ;; Do this now to avoid an annoying delay if the user 592 ;; Do this now to avoid an annoying delay if the user
592 ;; clicks the menu bar during the sit-for. 593 ;; clicks the menu bar during the sit-for.
593 (precompute-menubar-bindings) 594 (if (eq window-system 'x)
595 (precompute-menubar-bindings))
594 (setq menubar-bindings-done t) 596 (setq menubar-bindings-done t)
595 (unwind-protect 597 (unwind-protect
596 (progn 598 (progn