'(menu-item "Text Properties" facemenu-menu
:help "Change properties of text in region"))
-(define-key menu-bar-search-menu [separator-search]
+(define-key menu-bar-edit-menu [fill]
+ '(menu-item "Fill" fill-region
+ :enable (and mark-active (not buffer-read-only))
+ :help
+ "Fill text in region to fit between left and right margin"))
+
+(define-key menu-bar-edit-menu [separator-bookmark]
'(menu-item "--"))
(define-key menu-bar-edit-menu [bookmark]
'(menu-item "Bookmarks" menu-bar-bookmark-map
:help "Record positions and jump between them"))
-(define-key menu-bar-edit-menu [separator-bookmark]
- '(menu-item "--"))
-
(defvar menu-bar-goto-menu (make-sparse-keymap "Go To"))
(define-key menu-bar-goto-menu [set-tags-name]
(define-key menu-bar-edit-menu [search]
(list 'menu-item "Search" menu-bar-search-menu))
-(define-key menu-bar-edit-menu [fill]
- '(menu-item "Fill" fill-region
- :enable (and mark-active (not buffer-read-only))
- :help
- "Fill text in region to fit between left and right margin"))
+(define-key menu-bar-edit-menu [separator-search]
+ '(menu-item "--"))
+
(define-key menu-bar-edit-menu [mark-whole-buffer]
'(menu-item "Select All" mark-whole-buffer
:help "Mark the whole buffer for a subsequent cut/copy."))
(define-key menu-bar-edit-menu [select-paste]
'(menu-item "Select and Paste" yank-menu
:enable (and (cdr yank-menu) (not buffer-read-only))
- :help "Paste text cut/copied earlier"))
+ :help "Paste (yank) text cut or copied earlier"))
(define-key menu-bar-edit-menu [paste]
'(menu-item "Paste" yank
- :enable (and (x-selection-exists-p) (not buffer-read-only))
- :help "Paste text most recently cut/copied"))
+ :enable (and
+ ;; Emacs compiled --without-x doesn't have
+ ;; x-selection-exists-p.
+ (fboundp 'x-selection-exists-p)
+ (x-selection-exists-p) (not buffer-read-only))
+ :help "Paste (yank) text most recently cut/copied"))
(define-key menu-bar-edit-menu [copy]
'(menu-item "Copy" menu-bar-kill-ring-save
:enable mark-active
- :help "Copy text in region between mark and current position"))
+ :help "Copy text in region between mark and current position"
+ :keys "\\[kill-ring-save]"))
(define-key menu-bar-edit-menu [cut]
'(menu-item "Cut" kill-region
:enable (and mark-active (not buffer-read-only))
(put 'clipboard-kill-region 'menu-enable 'mark-active)
(put 'clipboard-kill-ring-save 'menu-enable 'mark-active)
(put 'clipboard-yank 'menu-enable
- '(or (x-selection-exists-p) (x-selection-exists-p 'CLIPBOARD)))
+ '(or (and (fboundp 'x-selection-exists-p) (x-selection-exists-p))
+ (x-selection-exists-p 'CLIPBOARD)))
(defun clipboard-yank ()
"Insert the clipboard contents, or the last stretch of killed text."
'("--"))
(define-key menu-bar-options-menu [highlight-paren-mode]
(menu-bar-make-toggle toggle-highlight-paren-mode show-paren-mode
- "Highlight Matching Parentheses"
+ "Paren Match Highlighting (Show Paren mode)"
"Show Paren mode %s"
- "Highlight matching and mismatched parentheses"
+ "Highlight matching/mismatched parentheses at cursor"
(show-paren-mode)))
(define-key menu-bar-options-menu [transient-mark-mode]
(menu-bar-make-toggle toggle-transient-mark-mode transient-mark-mode
- "Transient Mark Mode (highlights region)"
+ "Active Region Highlighting (Transient Mark mode)"
"Transient Mark mode %s"
- "Highlight the marked region when it's active"))
+ "Make text in active region stand out in color"))
(define-key menu-bar-options-menu [toggle-global-lazy-font-lock-mode]
(menu-bar-make-toggle toggle-global-lazy-font-lock-mode global-font-lock-mode
- "Highlight Syntax (Global Font Lock)"
- "Syntax Highlighting %s"
- "Highlight text based on language syntax"
+ "Syntax Highlighting (Global Font Lock mode)"
+ "Global Font Lock mode %s"
+ "Colorize text based on language syntax"
(global-font-lock-mode)))
\f
'(menu-item "Show All of Mule Status" mule-diag
:visible default-enable-multibyte-characters
:help "Display multilingual environment settings"))
+(define-key menu-bar-describe-menu [describe-coding-system-briefly]
+ '(menu-item "Describe Coding System (Briefly)..."
+ describe-current-coding-system-briefly
+ :visible default-enable-multibyte-characters))
(define-key menu-bar-describe-menu [describe-coding-system]
'(menu-item "Describe Coding System..." describe-coding-system
:visible default-enable-multibyte-characters))
(define-key menu-bar-describe-menu [list-keybindings]
'(menu-item "List Key Bindings" describe-bindings
:help "Display a list of all current keybindings"))
-(define-key menu-bar-describe-menu [list-keybindings]
- '(menu-item "List Key Bindings" describe-bindings
- :help "Display a list of all current keybindings"))
+(define-key menu-bar-describe-menu [describe-current-display-table]
+ '(menu-item "Describe Display Table" describe-current-display-table
+ :help "Describe the current display table"))
+(define-key menu-bar-describe-menu [describe-face]
+ '(menu-item "Describe Face..." describe-face
+ :help "Display the properties of a face"))
(define-key menu-bar-describe-menu [describe-variable]
'(menu-item "Describe Variable..." describe-variable
:help "Display documentation of variable/option"))
;; Users typically don't identify keys and menu items...
:help "Display documentation of command bound to a \
key (or menu-item)"))
-(define-key menu-bar-describe-menu [apropos-variables]
- '(menu-item "Apropos Variables..." apropos-variable
- :help "List variables whose names match a regexp"))
-(define-key menu-bar-describe-menu [apropos-commands]
- '(menu-item "Apropos Commands..." apropos-command
- :help "List commands whose names match a regexp"))
(define-key menu-bar-describe-menu [describe-mode]
'(menu-item "Describe Buffer Modes" describe-mode
:help "Describe this buffer's major and minor mode"))
-(defvar menu-bar-manuals-menu (make-sparse-keymap "Manuals"))
+(defvar menu-bar-apropos-menu (make-sparse-keymap "Apropos"))
+(defun menu-bar-read-lispref ()
+ "Display the Emacs Lisp Reference manual in Info mode."
+ (interactive)
+ (info "elisp"))
+
+(defun menu-bar-read-lispintro ()
+ "Display the Introduction to Emacs Lisp Programming in Info mode."
+ (interactive)
+ (info "eintr"))
+
+(defun menu-bar-read-emacs-man ()
+ "Display Emacs User Manual in Info mode."
+ (interactive)
+ (info "emacs"))
+
+(defun search-emacs-glossary ()
+ "Display the Glossary node of the Emacs manual in Info mode."
+ (interactive)
+ (info "(emacs)Glossary"))
+
+(defun emacs-index-search (topic)
+ "Look up TOPIC in the indices of the Emacs User Manual."
+ (interactive "sSubject to look up: ")
+ (info "emacs")
+ (Info-index topic))
+
+(defun elisp-index-search (topic)
+ "Look up TOPIC in the indices of the Emacs Lisp Reference Manual."
+ (interactive "sSubject to look up: ")
+ (info "elisp")
+ (Info-index topic))
+
+(define-key menu-bar-apropos-menu [apropos-documentation]
+ '(menu-item "Search Documentation Strings..." apropos-documentation
+ :help
+ "Find functions and variables whose doc strings match a regexp"))
+(define-key menu-bar-apropos-menu [apropos]
+ '(menu-item "Find Any Object by Name..." apropos
+ :help "Find symbols of any kind whose names match a regexp"))
+(define-key menu-bar-apropos-menu [apropos-value]
+ '(menu-item "Find Options by Value..." apropos-value
+ :help "Find variables whose values match a regexp"))
+(define-key menu-bar-apropos-menu [apropos-variables]
+ '(menu-item "Find Options by Name..." apropos-variable
+ :help "Find variables whose names match a regexp"))
+(define-key menu-bar-apropos-menu [apropos-commands]
+ '(menu-item "Find Commands by Name..." apropos-command
+ :help "Find commands whose names match a regexp"))
+(define-key menu-bar-apropos-menu [sep1]
+ '("--"))
+(define-key menu-bar-apropos-menu [elisp-index-search]
+ '(menu-item "Look Up Subject in ELisp Manual..." elisp-index-search
+ :help "Find description of a subject in Emacs Lisp manual"))
+(define-key menu-bar-apropos-menu [emacs-index-search]
+ '(menu-item "Look Up Subject in User Manual..." emacs-index-search
+ :help "Find description of a subject in Emacs User manual"))
+(define-key menu-bar-apropos-menu [emacs-glossary]
+ '(menu-item "Emacs Terminology" search-emacs-glossary
+ :help "Display the Glossary section of the Emacs manual"))
+
+(defvar menu-bar-manuals-menu (make-sparse-keymap "More Manuals"))
(define-key menu-bar-manuals-menu [man]
'(menu-item "Read Man Page..." manual-entry
:help "Man-page docs for external commands and libraries"))
(define-key menu-bar-manuals-menu [sep2]
'("--"))
+(define-key menu-bar-manuals-menu [order-emacs-manuals]
+ '(menu-item "Ordering Manuals" view-order-manuals
+ :help "How to order manuals from the Free Software Foundation"))
(define-key menu-bar-manuals-menu [info]
- '(menu-item "Browse Manuals with Info" Info-directory
+ '(menu-item "All Other Manuals (Info)" Info-directory
:help "Read any of the installed manuals"))
+(define-key menu-bar-manuals-menu [info-elisp]
+ '(menu-item "Emacs Lisp Reference" menu-bar-read-lispref
+ :help "Read the Emacs Lisp Reference manual"))
+(define-key menu-bar-manuals-menu [info-elintro]
+ '(menu-item "Introduction to Emacs Lisp" menu-bar-read-lispintro
+ :help "Read the Introduction to Emacs Lisp Programming"))
+(define-key menu-bar-manuals-menu [sep3]
+ '("--"))
(define-key menu-bar-manuals-menu [command]
'(menu-item "Find Command in Manual" Info-goto-emacs-command-node
:help "Display manual section that describes a command"))
(define-key menu-bar-help-menu [eliza]
'(menu-item "Emacs Psychiatrist" doctor
:help "Our doctor will help you feel better"))
-(define-key menu-bar-help-menu [sep3]
+(define-key menu-bar-help-menu [sep4]
'("--"))
(define-key menu-bar-help-menu [describe-no-warranty]
'(menu-item "(Non)Warranty" describe-no-warranty
(define-key menu-bar-help-menu [finder-by-keyword]
'(menu-item "Find Emacs Packages..." finder-by-keyword
:help "Find packages and features by keyword"))
+(define-key menu-bar-help-menu [manuals]
+ (list 'menu-item "More Manuals" menu-bar-manuals-menu
+ :help "Search and browse on-line manuals"))
+(define-key menu-bar-help-menu [emacs-manual]
+ '(menu-item "Read the Emacs Manual" menu-bar-read-emacs-man
+ :help "Full documentation of Emacs features"))
(define-key menu-bar-help-menu [describe]
(list 'menu-item "Describe" menu-bar-describe-menu
:help "Describe commands, variables, keys"))
-(define-key menu-bar-help-menu [manuals]
- (list 'menu-item "Manuals" menu-bar-manuals-menu
- :help "Lookup commands and keys in docs, read manuals"))
+(define-key menu-bar-help-menu [apropos]
+ (list 'menu-item "Search Documentation" menu-bar-apropos-menu
+ :help "Look up terms, find commands, options, etc. (Apropos)"))
(define-key menu-bar-help-menu [sep1]
'("--"))
(define-key menu-bar-help-menu [report-emacs-bug]
'(menu-item "Send Bug Report..." report-emacs-bug
:help "Send e-mail to Emacs maintainers"))
-(define-key menu-bar-help-menu [order-emacs-manuals]
- '(menu-item "Ordering Manuals" view-order-manuals
- :help "How to order manuals from the Free Software Foundation"))
-(define-key menu-bar-help-menu [emacs-manual]
- '(menu-item "Read the Emacs Manual"
- (lambda () (interactive) (info "emacs"))))
(define-key menu-bar-help-menu [emacs-problems]
'(menu-item "Emacs Known Problems" view-emacs-problems))
(define-key menu-bar-help-menu [emacs-news]
(defun menu-bar-update-buffers-1 (elt)
(cons (format
- (format "%%%ds %%s%%s %%s" menu-bar-update-buffers-maxbuf)
+ ;; (format "%%%ds %%s%%s %%s" menu-bar-update-buffers-maxbuf)
+ "%s %s%s -- %s"
(cdr elt)
(if (buffer-modified-p (car elt))
"*" " ")
\f
;;; Set up a menu bar menu for the minibuffer.
-(dolist (map (list minibuffer-local-ns-map
- minibuffer-local-must-match-map
- minibuffer-local-isearch-map
- minibuffer-local-map
+(dolist (map (list minibuffer-local-map
+ ;; This shouldn't be necessary, but there's a funny
+ ;; bug in keymap.c that I don't understand yet. -stef
minibuffer-local-completion-map))
(define-key map [menu-bar minibuf]
(cons "Minibuf" (make-sparse-keymap "Minibuf"))))
-(dolist (map (list minibuffer-local-must-match-map
- minibuffer-local-completion-map))
+(let ((map minibuffer-local-completion-map))
(define-key map [menu-bar minibuf ?\?]
(list 'menu-item "List Completions" 'minibuffer-completion-help
:help "Display all possible completions"))
(list 'menu-item "Complete" 'minibuffer-complete
:help "Complete as far as possible")))
-(dolist (map (list minibuffer-local-ns-map
- minibuffer-local-must-match-map
- minibuffer-local-isearch-map
- minibuffer-local-map
- minibuffer-local-completion-map))
+(let ((map minibuffer-local-map))
(define-key map [menu-bar minibuf quit]
(list 'menu-item "Quit" 'keyboard-escape-quit
:help "Abort input and exit minibuffer"))