comparison lisp/menu-bar.el @ 41703:5ef9446a197a

(menu-bar-read-lispref, menu-bar-read-lispintro) (menu-bar-read-emacs-man, search-emacs-glossary) (emacs-index-search, elisp-index-search): New functions. (apropso-documentation, apropos, apropos-value, apropos-variable) (apropos-commands): Modify menu item names and help text. (elisp-index-search, emacs-index-search, emacs-glossary): New menu items. (menu-bar-manuals-menu): Move the Ordering Manuals item to a submenu. (info-elisp, info-elintro): New menu items. (apropos): Modify the menu item name.
author Eli Zaretskii <eliz@gnu.org>
date Fri, 30 Nov 2001 10:22:00 +0000
parents 11d8d3ad5061
children 524400c8c8b5
comparison
equal deleted inserted replaced
41702:1e0988cac637 41703:5ef9446a197a
851 (define-key menu-bar-describe-menu [describe-mode] 851 (define-key menu-bar-describe-menu [describe-mode]
852 '(menu-item "Describe Buffer Modes" describe-mode 852 '(menu-item "Describe Buffer Modes" describe-mode
853 :help "Describe this buffer's major and minor mode")) 853 :help "Describe this buffer's major and minor mode"))
854 854
855 (defvar menu-bar-apropos-menu (make-sparse-keymap "Apropos")) 855 (defvar menu-bar-apropos-menu (make-sparse-keymap "Apropos"))
856 (defun menu-bar-read-lispref ()
857 "Display the Emacs Lisp Reference manual in Info mode."
858 (interactive)
859 (info "elisp"))
860
861 (defun menu-bar-read-lispintro ()
862 "Display the Introduction to Emacs Lisp Programming in Info mode."
863 (interactive)
864 (info "eintr"))
865
866 (defun menu-bar-read-emacs-man ()
867 "Display Emacs User Manual in Info mode."
868 (interactive)
869 (info "emacs"))
870
871 (defun search-emacs-glossary ()
872 "Display the Glossary node of the Emacs manual in Info mode."
873 (interactive)
874 (info "(emacs)Glossary"))
875
876 (defun emacs-index-search (topic)
877 "Look up TOPIC in the indices of the Emacs User Manual."
878 (interactive "sSubject to look up: ")
879 (info "emacs")
880 (Info-index topic))
881
882 (defun elisp-index-search (topic)
883 "Look up TOPIC in the indices of the Emacs Lisp Reference Manual."
884 (interactive "sSubject to look up: ")
885 (info "elisp")
886 (Info-index topic))
856 887
857 (define-key menu-bar-apropos-menu [apropos-documentation] 888 (define-key menu-bar-apropos-menu [apropos-documentation]
858 '(menu-item "Apropos Documentation..." apropos-documentation 889 '(menu-item "Search Documentation Strings..." apropos-documentation
859 :help "List variables whose doc strings match a regexp")) 890 :help
891 "Find functions and variables whose doc strings match a regexp"))
860 (define-key menu-bar-apropos-menu [apropos] 892 (define-key menu-bar-apropos-menu [apropos]
861 '(menu-item "Apropos Symbol..." apropos 893 '(menu-item "Find Any Object by Name..." apropos
862 :help "List symbols whose names match a regexp")) 894 :help "Find symbols of any kind whose names match a regexp"))
863 (define-key menu-bar-apropos-menu [apropos-value] 895 (define-key menu-bar-apropos-menu [apropos-value]
864 '(menu-item "Apropos Value..." apropos-value 896 '(menu-item "Find Options by Value..." apropos-value
865 :help "List variables whose values match a regexp")) 897 :help "Find variables whose values match a regexp"))
866 (define-key menu-bar-apropos-menu [apropos-variables] 898 (define-key menu-bar-apropos-menu [apropos-variables]
867 '(menu-item "Apropos Variables..." apropos-variable 899 '(menu-item "Find Options by Name..." apropos-variable
868 :help "List variables whose names match a regexp")) 900 :help "Find variables whose names match a regexp"))
869 (define-key menu-bar-apropos-menu [apropos-commands] 901 (define-key menu-bar-apropos-menu [apropos-commands]
870 '(menu-item "Apropos Commands..." apropos-command 902 '(menu-item "Find Commands by Name..." apropos-command
871 :help "List commands whose names match a regexp")) 903 :help "Find commands whose names match a regexp"))
872 904 (define-key menu-bar-apropos-menu [sep1]
873 (defvar menu-bar-manuals-menu (make-sparse-keymap "Manuals")) 905 '("--"))
906 (define-key menu-bar-apropos-menu [elisp-index-search]
907 '(menu-item "Look Up Subject in ELisp Manual..." elisp-index-search
908 :help "Find description of a subject in Emacs Lisp manual"))
909 (define-key menu-bar-apropos-menu [emacs-index-search]
910 '(menu-item "Look Up Subject in User Manual..." emacs-index-search
911 :help "Find description of a subject in Emacs User manual"))
912 (define-key menu-bar-apropos-menu [emacs-glossary]
913 '(menu-item "Emacs Terminology" search-emacs-glossary
914 :help "Display the Glossary section of the Emacs manual"))
915
916 (defvar menu-bar-manuals-menu (make-sparse-keymap "More Manuals"))
874 917
875 (define-key menu-bar-manuals-menu [man] 918 (define-key menu-bar-manuals-menu [man]
876 '(menu-item "Read Man Page..." manual-entry 919 '(menu-item "Read Man Page..." manual-entry
877 :help "Man-page docs for external commands and libraries")) 920 :help "Man-page docs for external commands and libraries"))
878 (define-key menu-bar-manuals-menu [sep2] 921 (define-key menu-bar-manuals-menu [sep2]
879 '("--")) 922 '("--"))
923 (define-key menu-bar-manuals-menu [order-emacs-manuals]
924 '(menu-item "Ordering Manuals" view-order-manuals
925 :help "How to order manuals from the Free Software Foundation"))
880 (define-key menu-bar-manuals-menu [info] 926 (define-key menu-bar-manuals-menu [info]
881 '(menu-item "Browse Manuals with Info" Info-directory 927 '(menu-item "All Other Manuals (Info)" Info-directory
882 :help "Read any of the installed manuals")) 928 :help "Read any of the installed manuals"))
929 (define-key menu-bar-manuals-menu [info-elisp]
930 '(menu-item "Emacs Lisp Reference" menu-bar-read-lispref
931 :help "Read the Emacs Lisp Reference manual"))
932 (define-key menu-bar-manuals-menu [info-elintro]
933 '(menu-item "Introduction to Emacs Lisp" menu-bar-read-lispintro
934 :help "Read the Introduction to Emacs Lisp Programming"))
935 (define-key menu-bar-manuals-menu [sep3]
936 '("--"))
883 (define-key menu-bar-manuals-menu [command] 937 (define-key menu-bar-manuals-menu [command]
884 '(menu-item "Find Command in Manual" Info-goto-emacs-command-node 938 '(menu-item "Find Command in Manual" Info-goto-emacs-command-node
885 :help "Display manual section that describes a command")) 939 :help "Display manual section that describes a command"))
886 (define-key menu-bar-manuals-menu [key] 940 (define-key menu-bar-manuals-menu [key]
887 '(menu-item "Find Key in Manual" Info-goto-emacs-key-command-node 941 '(menu-item "Find Key in Manual" Info-goto-emacs-key-command-node
888 :help "Display manual section that describes a key")) 942 :help "Display manual section that describes a key"))
889 943
890 (define-key menu-bar-help-menu [eliza] 944 (define-key menu-bar-help-menu [eliza]
891 '(menu-item "Emacs Psychiatrist" doctor 945 '(menu-item "Emacs Psychiatrist" doctor
892 :help "Our doctor will help you feel better")) 946 :help "Our doctor will help you feel better"))
893 (define-key menu-bar-help-menu [sep3] 947 (define-key menu-bar-help-menu [sep4]
894 '("--")) 948 '("--"))
895 (define-key menu-bar-help-menu [describe-no-warranty] 949 (define-key menu-bar-help-menu [describe-no-warranty]
896 '(menu-item "(Non)Warranty" describe-no-warranty 950 '(menu-item "(Non)Warranty" describe-no-warranty
897 :help "Explain that Emacs has NO WARRANTY")) 951 :help "Explain that Emacs has NO WARRANTY"))
898 (define-key menu-bar-help-menu [describe-copying] 952 (define-key menu-bar-help-menu [describe-copying]
915 (define-key menu-bar-help-menu [sep2] 969 (define-key menu-bar-help-menu [sep2]
916 '("--")) 970 '("--"))
917 (define-key menu-bar-help-menu [finder-by-keyword] 971 (define-key menu-bar-help-menu [finder-by-keyword]
918 '(menu-item "Find Emacs Packages..." finder-by-keyword 972 '(menu-item "Find Emacs Packages..." finder-by-keyword
919 :help "Find packages and features by keyword")) 973 :help "Find packages and features by keyword"))
920 (define-key menu-bar-help-menu [apropos] 974 (define-key menu-bar-help-menu [manuals]
921 (list 'menu-item "Apropos" menu-bar-apropos-menu 975 (list 'menu-item "More Manuals" menu-bar-manuals-menu
922 :help "Find commands, variables, keys")) 976 :help "Search and browse on-line manuals"))
977 (define-key menu-bar-help-menu [emacs-manual]
978 '(menu-item "Read the Emacs Manual" menu-bar-read-emacs-man
979 :help "Full documentation of Emacs features"))
923 (define-key menu-bar-help-menu [describe] 980 (define-key menu-bar-help-menu [describe]
924 (list 'menu-item "Describe" menu-bar-describe-menu 981 (list 'menu-item "Describe" menu-bar-describe-menu
925 :help "Describe commands, variables, keys")) 982 :help "Describe commands, variables, keys"))
926 (define-key menu-bar-help-menu [manuals] 983 (define-key menu-bar-help-menu [apropos]
927 (list 'menu-item "Manuals" menu-bar-manuals-menu 984 (list 'menu-item "Search Documentation" menu-bar-apropos-menu
928 :help "Lookup commands and keys in docs, read manuals")) 985 :help "Look up terms, find commands, options, etc. (Apropos)"))
929 (define-key menu-bar-help-menu [sep1] 986 (define-key menu-bar-help-menu [sep1]
930 '("--")) 987 '("--"))
931 (define-key menu-bar-help-menu [report-emacs-bug] 988 (define-key menu-bar-help-menu [report-emacs-bug]
932 '(menu-item "Send Bug Report..." report-emacs-bug 989 '(menu-item "Send Bug Report..." report-emacs-bug
933 :help "Send e-mail to Emacs maintainers")) 990 :help "Send e-mail to Emacs maintainers"))
934 (define-key menu-bar-help-menu [order-emacs-manuals]
935 '(menu-item "Ordering Manuals" view-order-manuals
936 :help "How to order manuals from the Free Software Foundation"))
937 (define-key menu-bar-help-menu [emacs-manual]
938 '(menu-item "Read the Emacs Manual"
939 (lambda () (interactive) (info "emacs"))))
940 (define-key menu-bar-help-menu [emacs-problems] 991 (define-key menu-bar-help-menu [emacs-problems]
941 '(menu-item "Emacs Known Problems" view-emacs-problems)) 992 '(menu-item "Emacs Known Problems" view-emacs-problems))
942 (define-key menu-bar-help-menu [emacs-news] 993 (define-key menu-bar-help-menu [emacs-news]
943 '(menu-item "Emacs News" view-emacs-news 994 '(menu-item "Emacs News" view-emacs-news
944 :help "New features of this version")) 995 :help "New features of this version"))