Mercurial > emacs
comparison lisp/menu-bar.el @ 70882:c5d2bd581ee7
* menu-bar.el, international/mule-cmds.el: Remove tooltips for
menu entries that open submenus.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Wed, 24 May 2006 14:21:52 +0000 |
parents | 757874788485 |
children | 3ffa2f66a303 |
comparison
equal
deleted
inserted
replaced
70881:376e2df4e22d | 70882:c5d2bd581ee7 |
---|---|
298 '(menu-item "Forward String..." isearch-forward | 298 '(menu-item "Forward String..." isearch-forward |
299 :help "Search forward for a string as you type it")) | 299 :help "Search forward for a string as you type it")) |
300 | 300 |
301 | 301 |
302 (define-key menu-bar-search-menu [i-search] | 302 (define-key menu-bar-search-menu [i-search] |
303 (list 'menu-item "Incremental Search" menu-bar-i-search-menu | 303 (list 'menu-item "Incremental Search" menu-bar-i-search-menu)) |
304 :help "Incremental Search finds partial matches while you type the search string.\nIt is most convenient from the keyboard. Try it!")) | |
305 (define-key menu-bar-search-menu [separator-tag-isearch] | 304 (define-key menu-bar-search-menu [separator-tag-isearch] |
306 '(menu-item "--")) | 305 '(menu-item "--")) |
307 | 306 |
308 (define-key menu-bar-search-menu [tags-continue] | 307 (define-key menu-bar-search-menu [tags-continue] |
309 '(menu-item "Continue Tags Search" tags-loop-continue | 308 '(menu-item "Continue Tags Search" tags-loop-continue |
367 :enable (not buffer-read-only) | 366 :enable (not buffer-read-only) |
368 :help "Replace string interactively, ask about each occurrence")) | 367 :help "Replace string interactively, ask about each occurrence")) |
369 | 368 |
370 ;;; Assemble the top-level Edit menu items. | 369 ;;; Assemble the top-level Edit menu items. |
371 (define-key menu-bar-edit-menu [props] | 370 (define-key menu-bar-edit-menu [props] |
372 '(menu-item "Text Properties" facemenu-menu | 371 '(menu-item "Text Properties" facemenu-menu)) |
373 :help "Change properties of text in region")) | |
374 | 372 |
375 (define-key menu-bar-edit-menu [fill] | 373 (define-key menu-bar-edit-menu [fill] |
376 '(menu-item "Fill" fill-region | 374 '(menu-item "Fill" fill-region |
377 :enable (and mark-active (not buffer-read-only)) | 375 :enable (and mark-active (not buffer-read-only)) |
378 :help | 376 :help |
380 | 378 |
381 (define-key menu-bar-edit-menu [separator-bookmark] | 379 (define-key menu-bar-edit-menu [separator-bookmark] |
382 '(menu-item "--")) | 380 '(menu-item "--")) |
383 | 381 |
384 (define-key menu-bar-edit-menu [bookmark] | 382 (define-key menu-bar-edit-menu [bookmark] |
385 '(menu-item "Bookmarks" menu-bar-bookmark-map | 383 '(menu-item "Bookmarks" menu-bar-bookmark-map)) |
386 :help "Record positions and jump between them")) | |
387 | 384 |
388 (defvar menu-bar-goto-menu (make-sparse-keymap "Go To")) | 385 (defvar menu-bar-goto-menu (make-sparse-keymap "Go To")) |
389 | 386 |
390 (define-key menu-bar-goto-menu [set-tags-name] | 387 (define-key menu-bar-goto-menu [set-tags-name] |
391 '(menu-item "Set Tags File Name..." visit-tags-table | 388 '(menu-item "Set Tags File Name..." visit-tags-table |
465 "Delete the text in region between mark and current position")) | 462 "Delete the text in region between mark and current position")) |
466 (defvar yank-menu (cons "Select Yank" nil)) | 463 (defvar yank-menu (cons "Select Yank" nil)) |
467 (fset 'yank-menu (cons 'keymap yank-menu)) | 464 (fset 'yank-menu (cons 'keymap yank-menu)) |
468 (define-key menu-bar-edit-menu [select-paste] | 465 (define-key menu-bar-edit-menu [select-paste] |
469 '(menu-item "Select and Paste" yank-menu | 466 '(menu-item "Select and Paste" yank-menu |
470 :enable (and (cdr yank-menu) (not buffer-read-only)) | 467 :enable (and (cdr yank-menu) (not buffer-read-only)))) |
471 :help "Paste (yank) text cut or copied earlier")) | |
472 (define-key menu-bar-edit-menu [paste] | 468 (define-key menu-bar-edit-menu [paste] |
473 '(menu-item "Paste" yank | 469 '(menu-item "Paste" yank |
474 :enable (and | 470 :enable (and |
475 ;; Emacs compiled --without-x doesn't have | 471 ;; Emacs compiled --without-x doesn't have |
476 ;; x-selection-exists-p. | 472 ;; x-selection-exists-p. |
639 :button (:toggle . (and (default-boundp ',variable) | 635 :button (:toggle . (and (default-boundp ',variable) |
640 (default-value ',variable)))))) | 636 (default-value ',variable)))))) |
641 | 637 |
642 ;;; Assemble all the top-level items of the "Options" menu | 638 ;;; Assemble all the top-level items of the "Options" menu |
643 (define-key menu-bar-options-menu [customize] | 639 (define-key menu-bar-options-menu [customize] |
644 (list 'menu-item "Customize Emacs" menu-bar-custom-menu | 640 (list 'menu-item "Customize Emacs" menu-bar-custom-menu)) |
645 :help "Full customization of every Emacs feature")) | |
646 | 641 |
647 (defun menu-bar-options-save () | 642 (defun menu-bar-options-save () |
648 "Save current values of Options menu items using Custom." | 643 "Save current values of Options menu items using Custom." |
649 (interactive) | 644 (interactive) |
650 (let ((need-save nil)) | 645 (let ((need-save nil)) |
878 :visible (display-graphic-p) | 873 :visible (display-graphic-p) |
879 :button (:radio . (eq fringe-mode 0)))) | 874 :button (:radio . (eq fringe-mode 0)))) |
880 | 875 |
881 (define-key menu-bar-showhide-menu [showhide-fringe] | 876 (define-key menu-bar-showhide-menu [showhide-fringe] |
882 (list 'menu-item "Fringe" menu-bar-showhide-fringe-menu | 877 (list 'menu-item "Fringe" menu-bar-showhide-fringe-menu |
883 :visible `(display-graphic-p) | 878 :visible `(display-graphic-p))) |
884 :help "Select fringe mode")) | |
885 | 879 |
886 (defvar menu-bar-showhide-scroll-bar-menu (make-sparse-keymap "Scroll-bar")) | 880 (defvar menu-bar-showhide-scroll-bar-menu (make-sparse-keymap "Scroll-bar")) |
887 | 881 |
888 (define-key menu-bar-showhide-scroll-bar-menu [right] | 882 (define-key menu-bar-showhide-scroll-bar-menu [right] |
889 '(menu-item "On the Right" | 883 '(menu-item "On the Right" |
923 (interactive) | 917 (interactive) |
924 (customize-set-variable 'scroll-bar-mode nil)) | 918 (customize-set-variable 'scroll-bar-mode nil)) |
925 | 919 |
926 (define-key menu-bar-showhide-menu [showhide-scroll-bar] | 920 (define-key menu-bar-showhide-menu [showhide-scroll-bar] |
927 (list 'menu-item "Scroll-bar" menu-bar-showhide-scroll-bar-menu | 921 (list 'menu-item "Scroll-bar" menu-bar-showhide-scroll-bar-menu |
928 :visible `(display-graphic-p) | 922 :visible `(display-graphic-p))) |
929 :help "Select scroll-bar mode")) | |
930 | 923 |
931 (define-key menu-bar-showhide-menu [showhide-tooltip-mode] | 924 (define-key menu-bar-showhide-menu [showhide-tooltip-mode] |
932 (list 'menu-item "Tooltips" 'tooltip-mode | 925 (list 'menu-item "Tooltips" 'tooltip-mode |
933 :help "Toggle tooltips on/off" | 926 :help "Toggle tooltips on/off" |
934 :visible `(and (display-graphic-p) (fboundp 'x-show-tip)) | 927 :visible `(and (display-graphic-p) (fboundp 'x-show-tip)) |
944 :help "Turn tool-bar on/off" | 937 :help "Turn tool-bar on/off" |
945 :visible `(display-graphic-p) | 938 :visible `(display-graphic-p) |
946 :button `(:toggle . tool-bar-mode))) | 939 :button `(:toggle . tool-bar-mode))) |
947 | 940 |
948 (define-key menu-bar-options-menu [showhide] | 941 (define-key menu-bar-options-menu [showhide] |
949 (list 'menu-item "Show/Hide" menu-bar-showhide-menu | 942 (list 'menu-item "Show/Hide" menu-bar-showhide-menu)) |
950 :help "Toggle on/off various display features")) | |
951 | 943 |
952 (define-key menu-bar-options-menu [showhide-separator] | 944 (define-key menu-bar-options-menu [showhide-separator] |
953 '("--")) | 945 '("--")) |
954 | 946 |
955 (define-key menu-bar-options-menu [mule] | 947 (define-key menu-bar-options-menu [mule] |
958 ;; if you need to recompile all the Lisp files using interpreted code. | 950 ;; if you need to recompile all the Lisp files using interpreted code. |
959 (list 'menu-item "Mule (Multilingual Environment)" mule-menu-keymap | 951 (list 'menu-item "Mule (Multilingual Environment)" mule-menu-keymap |
960 ;; Most of the MULE menu actually does make sense in unibyte mode, | 952 ;; Most of the MULE menu actually does make sense in unibyte mode, |
961 ;; e.g. language selection. | 953 ;; e.g. language selection. |
962 ;;; ':visible 'default-enable-multibyte-characters | 954 ;;; ':visible 'default-enable-multibyte-characters |
963 ':help "Default language, encodings, input method")) | 955 )) |
964 ;(setq menu-bar-final-items (cons 'mule menu-bar-final-items)) | 956 ;(setq menu-bar-final-items (cons 'mule menu-bar-final-items)) |
965 ;(define-key menu-bar-options-menu [preferences] | 957 ;(define-key menu-bar-options-menu [preferences] |
966 ; (list 'menu-item "Preferences" menu-bar-preferences-menu | 958 ; (list 'menu-item "Preferences" menu-bar-preferences-menu |
967 ; :help "Toggle important global options")) | 959 ; :help "Toggle important global options")) |
968 | 960 |
1135 :help "Invoke the Emacs built-in quick calculator")) | 1127 :help "Invoke the Emacs built-in quick calculator")) |
1136 (define-key menu-bar-tools-menu [calc] | 1128 (define-key menu-bar-tools-menu [calc] |
1137 '(menu-item "Programmable Calculator" calc | 1129 '(menu-item "Programmable Calculator" calc |
1138 :help "Invoke the Emacs built-in full scientific calculator")) | 1130 :help "Invoke the Emacs built-in full scientific calculator")) |
1139 (define-key menu-bar-tools-menu [calendar] | 1131 (define-key menu-bar-tools-menu [calendar] |
1140 '(menu-item "Display Calendar" calendar)) | 1132 '(menu-item "Calendar" calendar)) |
1141 | 1133 |
1142 (define-key menu-bar-tools-menu [separator-net] | 1134 (define-key menu-bar-tools-menu [separator-net] |
1143 '("--")) | 1135 '("--")) |
1144 | 1136 |
1145 (define-key menu-bar-tools-menu [directory-search] | 1137 (define-key menu-bar-tools-menu [directory-search] |
1146 '(menu-item "Directory Search" eudc-tools-menu | 1138 '(menu-item "Directory Search" eudc-tools-menu)) |
1147 :help "Query directory servers via LDAP, CCSO PH/QI or BBDB")) | |
1148 (define-key menu-bar-tools-menu [compose-mail] | 1139 (define-key menu-bar-tools-menu [compose-mail] |
1149 (list | 1140 (list |
1150 'menu-item `(format "Send Mail (with %s)" (send-mail-item-name)) | 1141 'menu-item `(format "Send Mail (with %s)" (send-mail-item-name)) |
1151 'compose-mail | 1142 'compose-mail |
1152 :visible `(and mail-user-agent (not (eq mail-user-agent 'ignore))) | 1143 :visible `(and mail-user-agent (not (eq mail-user-agent 'ignore))) |
1170 (define-key menu-bar-tools-menu [separator-vc] | 1161 (define-key menu-bar-tools-menu [separator-vc] |
1171 '("--")) | 1162 '("--")) |
1172 | 1163 |
1173 (defvar vc-menu-map (make-sparse-keymap "Version Control")) | 1164 (defvar vc-menu-map (make-sparse-keymap "Version Control")) |
1174 (define-key menu-bar-tools-menu [pcl-cvs] | 1165 (define-key menu-bar-tools-menu [pcl-cvs] |
1175 '(menu-item "PCL-CVS" cvs-global-menu | 1166 '(menu-item "PCL-CVS" cvs-global-menu)) |
1176 :help "Module-level interface to CVS")) | |
1177 (define-key menu-bar-tools-menu [vc] | 1167 (define-key menu-bar-tools-menu [vc] |
1178 (list 'menu-item "Version Control" vc-menu-map | 1168 (list 'menu-item "Version Control" vc-menu-map)) |
1179 :help "Interface to RCS, CVS, SCCS")) | |
1180 | 1169 |
1181 (define-key menu-bar-tools-menu [separator-compare] | 1170 (define-key menu-bar-tools-menu [separator-compare] |
1182 '("--")) | 1171 '("--")) |
1183 | 1172 |
1184 (define-key menu-bar-tools-menu [ediff-misc] | 1173 (define-key menu-bar-tools-menu [ediff-misc] |
1185 '(menu-item "Ediff Miscellanea" menu-bar-ediff-misc-menu | 1174 '(menu-item "Ediff Miscellanea" menu-bar-ediff-misc-menu)) |
1186 :help "Ediff manual, customization, sessions, etc.")) | |
1187 (define-key menu-bar-tools-menu [epatch] | 1175 (define-key menu-bar-tools-menu [epatch] |
1188 '(menu-item "Apply Patch" menu-bar-epatch-menu)) | 1176 '(menu-item "Apply Patch" menu-bar-epatch-menu)) |
1189 (define-key menu-bar-tools-menu [ediff-merge] | 1177 (define-key menu-bar-tools-menu [ediff-merge] |
1190 '(menu-item "Merge" menu-bar-ediff-merge-menu | 1178 '(menu-item "Merge" menu-bar-ediff-merge-menu)) |
1191 :help "Merge different revisions of files/directories")) | |
1192 (define-key menu-bar-tools-menu [compare] | 1179 (define-key menu-bar-tools-menu [compare] |
1193 '(menu-item "Compare (Ediff)" menu-bar-ediff-menu | 1180 '(menu-item "Compare (Ediff)" menu-bar-ediff-menu)) |
1194 :help "Display differences between files/directories")) | |
1195 | |
1196 | 1181 |
1197 (define-key menu-bar-tools-menu [separator-spell] | 1182 (define-key menu-bar-tools-menu [separator-spell] |
1198 '("--")) | 1183 '("--")) |
1199 | 1184 |
1200 (define-key menu-bar-tools-menu [spell] | 1185 (define-key menu-bar-tools-menu [spell] |
1240 '(menu-item "Describe Input Method..." describe-input-method | 1225 '(menu-item "Describe Input Method..." describe-input-method |
1241 :visible default-enable-multibyte-characters | 1226 :visible default-enable-multibyte-characters |
1242 :help "Keyboard layout for specific input method")) | 1227 :help "Keyboard layout for specific input method")) |
1243 (define-key menu-bar-describe-menu [describe-language-environment] | 1228 (define-key menu-bar-describe-menu [describe-language-environment] |
1244 (list 'menu-item "Describe Language Environment" | 1229 (list 'menu-item "Describe Language Environment" |
1245 describe-language-environment-map | 1230 describe-language-environment-map)) |
1246 :help "Show multilingual settings for a specific language")) | |
1247 | 1231 |
1248 (define-key menu-bar-describe-menu [separator-desc-mule] | 1232 (define-key menu-bar-describe-menu [separator-desc-mule] |
1249 '("--")) | 1233 '("--")) |
1250 | 1234 |
1251 (define-key menu-bar-describe-menu [list-keybindings] | 1235 (define-key menu-bar-describe-menu [list-keybindings] |
1390 '("--")) | 1374 '("--")) |
1391 (define-key menu-bar-help-menu [finder-by-keyword] | 1375 (define-key menu-bar-help-menu [finder-by-keyword] |
1392 '(menu-item "Find Emacs Packages" finder-by-keyword | 1376 '(menu-item "Find Emacs Packages" finder-by-keyword |
1393 :help "Find packages and features by keyword")) | 1377 :help "Find packages and features by keyword")) |
1394 (define-key menu-bar-help-menu [manuals] | 1378 (define-key menu-bar-help-menu [manuals] |
1395 (list 'menu-item "More Manuals" menu-bar-manuals-menu | 1379 (list 'menu-item "More Manuals" menu-bar-manuals-menu)) |
1396 :help "Search and browse on-line manuals")) | |
1397 (define-key menu-bar-help-menu [emacs-manual] | 1380 (define-key menu-bar-help-menu [emacs-manual] |
1398 '(menu-item "Read the Emacs Manual" info-emacs-manual | 1381 '(menu-item "Read the Emacs Manual" info-emacs-manual |
1399 :help "Full documentation of Emacs features")) | 1382 :help "Full documentation of Emacs features")) |
1400 (define-key menu-bar-help-menu [describe] | 1383 (define-key menu-bar-help-menu [describe] |
1401 (list 'menu-item "Describe" menu-bar-describe-menu | 1384 (list 'menu-item "Describe" menu-bar-describe-menu)) |
1402 :help "Describe commands, variables, keys")) | |
1403 (define-key menu-bar-help-menu [apropos] | 1385 (define-key menu-bar-help-menu [apropos] |
1404 (list 'menu-item "Search Documentation" menu-bar-apropos-menu | 1386 (list 'menu-item "Search Documentation" menu-bar-apropos-menu)) |
1405 :help "Look up terms, find commands, options, etc. (Apropos)")) | |
1406 (define-key menu-bar-help-menu [sep1] | 1387 (define-key menu-bar-help-menu [sep1] |
1407 '("--")) | 1388 '("--")) |
1408 (define-key menu-bar-help-menu [report-emacs-bug] | 1389 (define-key menu-bar-help-menu [report-emacs-bug] |
1409 '(menu-item "Send Bug Report..." report-emacs-bug | 1390 '(menu-item "Send Bug Report..." report-emacs-bug |
1410 :help "Send e-mail to Emacs maintainers")) | 1391 :help "Send e-mail to Emacs maintainers")) |