comparison lisp/startup.el @ 32436:eaa64e9ff400

(normal-top-level): Use display-popup-menus-p instead of window-system. (command-line): Use display-graphic-p instead of window-system. (command-line-1): Use display-popup-menus-p and display-mouse-p instead of window-system.
author Eli Zaretskii <eliz@gnu.org>
date Thu, 12 Oct 2000 22:36:37 +0000
parents c49acc0abcf8
children 7f8af667c707
comparison
equal deleted inserted replaced
32435:5f41761ecd9d 32436:eaa64e9ff400
477 (if (fboundp 'font-menu-add-default) 477 (if (fboundp 'font-menu-add-default)
478 (font-menu-add-default)) 478 (font-menu-add-default))
479 (and window-setup-hook 479 (and window-setup-hook
480 (run-hooks 'window-setup-hook)) 480 (run-hooks 'window-setup-hook))
481 (or menubar-bindings-done 481 (or menubar-bindings-done
482 (if (memq window-system '(x w32)) 482 (if (display-popup-menus-p)
483 (precompute-menubar-bindings) 483 (precompute-menubar-bindings)))))))
484 ))))))
485 484
486 ;; Precompute the keyboard equivalents in the menu bar items. 485 ;; Precompute the keyboard equivalents in the menu bar items.
487 (defun precompute-menubar-bindings () 486 (defun precompute-menubar-bindings ()
488 (let ((submap (lookup-key global-map [menu-bar]))) 487 (let ((submap (lookup-key global-map [menu-bar])))
489 (while submap 488 (while submap
653 (> (cdr (assq 'menu-bar-lines (frame-parameters))) 0))) 652 (> (cdr (assq 'menu-bar-lines (frame-parameters))) 0)))
654 (menu-bar-mode t)) 653 (menu-bar-mode t))
655 654
656 ;; If frame was created with a tool bar, switch tool-bar-mode on. 655 ;; If frame was created with a tool bar, switch tool-bar-mode on.
657 (when (and (not noninteractive) 656 (when (and (not noninteractive)
658 (memq window-system '(x w32)) 657 (display-graphic-p)
659 (> (frame-parameter nil 'tool-bar-lines) 0)) 658 (> (frame-parameter nil 'tool-bar-lines) 0))
660 (tool-bar-mode t)) 659 (tool-bar-mode t))
661 660
662 ;; Can't do this init in defcustom because window-system isn't set. 661 ;; Can't do this init in defcustom because window-system isn't set.
663 (when (and (not noninteractive) 662 (when (and (not noninteractive)
1090 1089
1091 (when window-setup-hook 1090 (when window-setup-hook
1092 (run-hooks 'window-setup-hook) 1091 (run-hooks 'window-setup-hook)
1093 (setq window-setup-hook nil)) 1092 (setq window-setup-hook nil))
1094 1093
1095 (when (memq window-system '(x w32)) 1094 (when (display-popup-menus-p)
1096 (precompute-menubar-bindings)) 1095 (precompute-menubar-bindings))
1097 (setq menubar-bindings-done t) 1096 (setq menubar-bindings-done t)
1098 1097
1099 ;; Do this now to avoid an annoying delay if the user 1098 ;; Do this now to avoid an annoying delay if the user
1100 ;; clicks the menu bar during the sit-for. 1099 ;; clicks the menu bar during the sit-for.
1170 (insert " 1169 (insert "
1171 Activate menubar F10 or ESC ` or M-`") 1170 Activate menubar F10 or ESC ` or M-`")
1172 (insert (substitute-command-keys " 1171 (insert (substitute-command-keys "
1173 Activate menubar \\[tmm-menubar]"))) 1172 Activate menubar \\[tmm-menubar]")))
1174 1173
1175 ;; Windows and MSDOS (currently) do not count as 1174 (if (display-mouse-p)
1176 ;; window systems, but do have mouse support.
1177 (if window-system
1178 (insert " 1175 (insert "
1179 Mode-specific menu C-mouse-3 (third button, with CTRL)")) 1176 Mode-specific menu C-mouse-3 (third button, with CTRL)"))
1180 ;; Many users seem to have problems with these. 1177 ;; Many users seem to have problems with these.
1181 (insert " 1178 (insert "
1182 \(`C-' means use the CTRL key. `M-' means use the Meta (or Alt) key. 1179 \(`C-' means use the CTRL key. `M-' means use the Meta (or Alt) key.