comparison lisp/startup.el @ 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 5c923b88c9da
children a7f7ae7ef458
comparison
equal deleted inserted replaced
12299:d4e2494f12cb 12300:d2f3dd6083d2
293 (if (fboundp 'font-menu-add-default) 293 (if (fboundp 'font-menu-add-default)
294 (font-menu-add-default)) 294 (font-menu-add-default))
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)
314 315
315 ;; See if we should import version-control from the environment variable. 316 ;; See if we should import version-control from the environment variable.
588 (and window-setup-hook 589 (and window-setup-hook
589 (run-hooks 'window-setup-hook)) 590 (run-hooks 'window-setup-hook))
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
597 (insert (emacs-version) 599 (insert (emacs-version)
598 " 600 "