(setq desc
(propertize
mnemonic
- 'help-echo (format "%s end-of-line; mouse-1 to cycle"
+ 'help-echo (format "End-of-line style: %s\nmouse-1 to cycle"
(if (eq eol 0) "Unix-style LF"
(if (eq eol 1) "Dos-style CRLF"
(if (eq eol 2) "Mac-style CR"
(list (propertize
"%1*"
'help-echo (purecopy (lambda (window object point)
- (format "%sead-only: mouse-1 toggles"
+ (format "Buffer is %s\nmouse-1 toggles"
(save-selected-window
(select-window window)
(if buffer-read-only
- "R"
- "Not r")))))
+ "read-only"
+ "writable")))))
'local-map (purecopy (make-mode-line-mouse-map
'mouse-1
#'mode-line-toggle-read-only))
;; "\
;; mouse-1: select window, mouse-2: delete others, mouse-3: delete,
;; drag-mouse-1: resize, C-mouse-2: split horizontally"
- "mouse-1: select (drag to resize), mouse-2 = C-x 1, mouse-3 = C-x 0")
+ "mouse-1: Select (drag to resize)\n\
+mouse-2: Make current window occupy the whole frame\n\
+mouse-3: Remove current window from display")
(dashes (propertize "--" 'help-echo help-echo))
(standard-mode-line-format
(list
(list
(propertize "%[(" 'help-echo help-echo)
`(:propertize ("" mode-name)
- help-echo "mouse-1: major mode, mouse-2: major mode help, mouse-3: toggle minor modes"
+ help-echo "Major mode\n\
+mouse-1: Display major mode menu\n\
+mouse-2: Show help for major mode\n\
+mouse-3: Toggle minor modes"
mouse-face mode-line-highlight
local-map ,mode-line-major-mode-keymap)
'("" mode-line-process)
`(:propertize ("" minor-mode-alist)
mouse-face mode-line-highlight
- help-echo "mouse-1: minor mode, mouse-2: minor mode help, mouse-3: toggle minor modes"
+ help-echo "Minor mode\n\
+mouse-1: Display minor mode menu\n\
+mouse-2: Show help for minor mode\n\
+mouse-3: Toggle minor modes"
local-map ,mode-line-minor-mode-keymap)
- (propertize "%n" 'help-echo "mouse-2: widen"
+ (propertize "%n" 'help-echo "mouse-2: Remove narrowing from the current buffer"
'mouse-face 'mode-line-highlight
'local-map (make-mode-line-mouse-map
'mouse-2 #'mode-line-widen))
(standard-mode-line-position
`((-3 ,(propertize "%p" 'help-echo help-echo))
(size-indication-mode
- (8 ,(propertize " of %I" 'help-echo help-echo)))
+ (8 ,(propertize
+ " of %I"
+ ;; XXX needs better description
+ 'help-echo (format "Size indication mode\n%s" help-echo))))
(line-number-mode
((column-number-mode
- (10 ,(propertize " (%l,%c)" 'help-echo help-echo))
- (6 ,(propertize " L%l" 'help-echo help-echo))))
+ (10 ,(propertize
+ " (%l,%c)"
+ 'help-echo
+ (format "Line number and Column number\n%s" help-echo)))
+ (6 ,(propertize
+ " L%l"
+ 'help-echo
+ (format "Line number\n%s" help-echo)))))
((column-number-mode
- (5 ,(propertize " C%c" 'help-echo help-echo))))))))
+ (5 ,(propertize
+ " C%c"
+ 'help-echo
+ (format "Column number\n%s" help-echo)))))))))
(setq-default mode-line-format standard-mode-line-format)
(put 'mode-line-format 'standard-value
(list (propertize fmt
'face 'mode-line-buffer-id
'help-echo
- (purecopy "mouse-1: previous buffer, mouse-3: next buffer")
+ (purecopy "Buffer name\n\
+mouse-1: previous buffer\n\
+mouse-3: next buffer")
'mouse-face 'mode-line-highlight
'local-map mode-line-buffer-identification-keymap)))
;; Global ones can go on the menubar (Options --> Show/Hide).
(define-key mode-line-mode-menu [overwrite-mode]
`(menu-item ,(purecopy "Overwrite (Ovwrt)") overwrite-mode
+ :help "Overwrite mode: typed characters replace existing text"
:button (:toggle . overwrite-mode)))
(define-key mode-line-mode-menu [outline-minor-mode]
`(menu-item ,(purecopy "Outline (Outl)") outline-minor-mode
+ ;; XXX: This needs a good, brief description.
+ :help ""
:button (:toggle . (bound-and-true-p outline-minor-mode))))
(define-key mode-line-mode-menu [highlight-changes-mode]
`(menu-item ,(purecopy "Highlight changes (Chg)") highlight-changes-mode
+ :help "Show changes in the buffer in a distinctive color"
:button (:toggle . (bound-and-true-p highlight-changes-mode))))
(define-key mode-line-mode-menu [hide-ifdef-mode]
`(menu-item ,(purecopy "Hide ifdef (Ifdef)") hide-ifdef-mode
+ :help "Show/Hide code within #ifdef constructs"
:button (:toggle . (bound-and-true-p hide-ifdef-mode))))
(define-key mode-line-mode-menu [glasses-mode]
`(menu-item ,(purecopy "Glasses (o^o)") glasses-mode
+ :help "Insert virtual separators to make long identifiers easy to read"
:button (:toggle . (bound-and-true-p glasses-mode))))
(define-key mode-line-mode-menu [font-lock-mode]
`(menu-item ,(purecopy "Font Lock") font-lock-mode
+ :help "Syntax coloring"
:button (:toggle . font-lock-mode)))
(define-key mode-line-mode-menu [flyspell-mode]
`(menu-item ,(purecopy "Flyspell (Fly)") flyspell-mode
+ :help "Spell checking on the fly"
:button (:toggle . (bound-and-true-p flyspell-mode))))
(define-key mode-line-mode-menu [auto-revert-tail-mode]
`(menu-item ,(purecopy "Auto revert tail (Tail)") auto-revert-tail-mode
+ :help "Revert the tail of the buffer when buffer grows"
:enable (buffer-file-name)
:button (:toggle . (bound-and-true-p auto-revert-tail-mode))))
(define-key mode-line-mode-menu [auto-revert-mode]
`(menu-item ,(purecopy "Auto revert (ARev)") auto-revert-mode
+ :help "Revert the buffer when the file on disk changes"
:button (:toggle . (bound-and-true-p auto-revert-mode))))
(define-key mode-line-mode-menu [auto-fill-mode]
`(menu-item ,(purecopy "Auto fill (Fill)") auto-fill-mode
+ :help "Automatically insert new lines"
:button (:toggle . auto-fill-function)))
(define-key mode-line-mode-menu [abbrev-mode]
`(menu-item ,(purecopy "Abbrev (Abbrev)") abbrev-mode
+ :help "Automatically expand abbreviations"
:button (:toggle . abbrev-mode)))
(defun mode-line-mode-menu (event)
;;(define-key map [show-files]
;; '("Show Files under VC" . (vc-directory t)))
(define-key map [vc-retrieve-snapshot]
- '("Retrieve Snapshot" . vc-retrieve-snapshot))
+ '(menu-item "Retrieve Snapshot" vc-retrieve-snapshot
+ :help "Retrieve snapshot"))
(define-key map [vc-create-snapshot]
- '("Create Snapshot" . vc-create-snapshot))
- (define-key map [vc-directory] '("VC Directory Listing" . vc-directory))
+ '(menu-item "Create Snapshot" vc-create-snapshot
+ :help "Create Snapshot"))
+ (define-key map [vc-directory]
+ '(menu-item "VC Directory Listing" vc-directory
+ :help "Show the VC status of files in a directory"))
;; `vc-status' is a not-quite-ready replacement for `vc-directory'
;; (define-key map [vc-status] '("VC Status" . vc-status))
(define-key map [separator1] '("----"))
- (define-key map [vc-annotate] '("Annotate" . vc-annotate))
- (define-key map [vc-rename-file] '("Rename File" . vc-rename-file))
+ (define-key map [vc-annotate]
+ '(menu-item "Annotate" vc-annotate
+ :help "Display the edit history of the current file using colors"))
+ (define-key map [vc-rename-file]
+ '(menu-item "Rename File" vc-rename-file
+ :help "Rename file"))
(define-key map [vc-revision-other-window]
- '("Show Other Version" . vc-revision-other-window))
- (define-key map [vc-diff] '("Compare with Base Version" . vc-diff))
+ '(menu-item "Show Other Version" vc-revision-other-window
+ :help "Visit another version of the current file in another window"))
+ (define-key map [vc-diff]
+ '(menu-item "Compare with Base Version" vc-diff
+ :help "Compare file set with the base version"))
(define-key map [vc-update-change-log]
- '("Update ChangeLog" . vc-update-change-log))
- (define-key map [vc-print-log] '("Show History" . vc-print-log))
+ '(menu-item "Update ChangeLog" vc-update-change-log
+ :help "Find change log file and add entries from recent version control logs"))
+ (define-key map [vc-print-log]
+ '(menu-item "Show History" vc-print-log
+ :help "List the change log of the current file set in a window"))
(define-key map [separator2] '("----"))
(define-key map [vc-insert-header]
- '("Insert Header" . vc-insert-headers))
- (define-key map [undo] '("Undo Last Check-In" . vc-rollback))
+ '(menu-item "Insert Header" vc-insert-headers
+ :help "Insert headers into a file for use with a version control system.
+"))
+ (define-key map [undo]
+ '(menu-item "Undo Last Check-In" vc-rollback
+ :help "Remove the most recent changeset committed to the repository"))
(define-key map [vc-revert]
- '("Revert to Base Version" . vc-revert))
+ '(menu-item "Revert to Base Version" vc-revert
+ :help "Revert working copies of the selected file set to their repository contents"))
(define-key map [vc-update]
- '("Update to Latest Version" . vc-update))
- (define-key map [vc-next-action] '("Check In/Out" . vc-next-action))
- (define-key map [vc-register] '("Register" . vc-register))
+ '(menu-item "Update to Latest Version" vc-update
+ :help "Update the current fileset's files to their tip revisions"))
+ (define-key map [vc-next-action]
+ '(menu-item "Check In/Out" vc-next-action
+ :help "Do the next logical version control operation on the current fileset"))
+ (define-key map [vc-register]
+ '(menu-item "Register" vc-register
+ :help "Register file set into a version control system"))
map))
(defalias 'vc-menu-map vc-menu-map)