Tweaks to tool-bar for default, VC-dir, Compile, and Info.
* tool-bar.el (tool-bar-setup): Remove Help button. Remove label from Search and add a label to Undo. * vc/vc-dir.el (vc-dir-tool-bar-map): Rearrange, removing inappropriate buttons and adding :vert-only tags. * progmodes/compile.el (compilation-mode-tool-bar-map): Adjust to removal of Help tool-bar button. Remove Undo button for space. * info.el (info-tool-bar-map): Add :vert-only tags.
This commit is contained in:
parent
21a76236f6
commit
900503ae79
5 changed files with 65 additions and 47 deletions
|
@ -1,3 +1,16 @@
|
|||
2011-01-09 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* tool-bar.el (tool-bar-setup): Remove Help button. Remove label
|
||||
from Search and add a label to Undo.
|
||||
|
||||
* vc/vc-dir.el (vc-dir-tool-bar-map): Rearrange, removing
|
||||
inappropriate buttons and adding :vert-only tags.
|
||||
|
||||
* progmodes/compile.el (compilation-mode-tool-bar-map): Adjust to
|
||||
removal of Help tool-bar button. Remove Undo button for space.
|
||||
|
||||
* info.el (info-tool-bar-map): Add :vert-only tags.
|
||||
|
||||
2011-01-08 Tassilo Horn <tassilo@member.fsf.org>
|
||||
|
||||
* doc-view.el (doc-view-mode-p): Check for png or imagemagick
|
||||
|
|
11
lisp/info.el
11
lisp/info.el
|
@ -3777,13 +3777,16 @@ If FORK is non-nil, it is passed to `Info-goto-node'."
|
|||
(tool-bar-local-item-from-menu 'Info-up "up-node" map Info-mode-map
|
||||
:vert-only t)
|
||||
(define-key-after map [separator-2] menu-bar-separator)
|
||||
(tool-bar-local-item-from-menu 'Info-top-node "home" map Info-mode-map)
|
||||
(tool-bar-local-item-from-menu 'Info-top-node "home" map Info-mode-map
|
||||
:vert-only t)
|
||||
(tool-bar-local-item-from-menu 'Info-goto-node "jump-to" map Info-mode-map)
|
||||
(define-key-after map [separator-3] menu-bar-separator)
|
||||
(tool-bar-local-item-from-menu 'Info-index "index" map Info-mode-map
|
||||
:label "Index Search")
|
||||
(tool-bar-local-item-from-menu 'Info-search "search" map Info-mode-map)
|
||||
(tool-bar-local-item-from-menu 'Info-exit "exit" map Info-mode-map)
|
||||
:label "Index")
|
||||
(tool-bar-local-item-from-menu 'Info-search "search" map Info-mode-map
|
||||
:vert-only t)
|
||||
(tool-bar-local-item-from-menu 'Info-exit "exit" map Info-mode-map
|
||||
:vert-only t)
|
||||
map))
|
||||
|
||||
(defvar Info-menu-last-node nil)
|
||||
|
|
|
@ -1569,9 +1569,11 @@ Returns the compilation buffer created."
|
|||
(defvar compilation-mode-tool-bar-map
|
||||
;; When bootstrapping, tool-bar-map is not properly initialized yet,
|
||||
;; so don't do anything.
|
||||
(when (keymapp (butlast tool-bar-map))
|
||||
(let ((map (butlast (copy-keymap tool-bar-map)))
|
||||
(help (last tool-bar-map))) ;; Keep Help last in tool bar
|
||||
(when (keymapp tool-bar-map)
|
||||
(let ((map (copy-keymap tool-bar-map)))
|
||||
(define-key map [undo] nil)
|
||||
(define-key map [separator-2] nil)
|
||||
(define-key-after map [separator-compile] menu-bar-separator)
|
||||
(tool-bar-local-item
|
||||
"left-arrow" 'previous-error-no-select 'previous-error-no-select map
|
||||
:rtl "right-arrow"
|
||||
|
@ -1588,7 +1590,7 @@ Returns the compilation buffer created."
|
|||
(tool-bar-local-item
|
||||
"refresh" 'recompile 'recompile map
|
||||
:help "Restart compilation")
|
||||
(append map help))))
|
||||
map)))
|
||||
|
||||
(put 'compilation-mode 'mode-class 'special)
|
||||
|
||||
|
|
|
@ -254,7 +254,7 @@ holds a keymap."
|
|||
(tool-bar-add-item-from-menu 'save-buffer "save" nil
|
||||
:label "Save")
|
||||
(define-key-after (default-value 'tool-bar-map) [separator-1] menu-bar-separator)
|
||||
(tool-bar-add-item-from-menu 'undo "undo" nil :vert-only t)
|
||||
(tool-bar-add-item-from-menu 'undo "undo" nil)
|
||||
(define-key-after (default-value 'tool-bar-map) [separator-2] menu-bar-separator)
|
||||
(tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [cut])
|
||||
"cut" nil :vert-only t)
|
||||
|
@ -263,25 +263,22 @@ holds a keymap."
|
|||
(tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [paste])
|
||||
"paste" nil :vert-only t)
|
||||
(define-key-after (default-value 'tool-bar-map) [separator-3] menu-bar-separator)
|
||||
(tool-bar-add-item-from-menu 'nonincremental-search-forward "search"
|
||||
nil :label "Search")
|
||||
(tool-bar-add-item-from-menu 'isearch-forward "search"
|
||||
nil :label "Search" :vert-only t)
|
||||
;;(tool-bar-add-item-from-menu 'ispell-buffer "spell")
|
||||
|
||||
;; There's no icon appropriate for News and we need a command rather
|
||||
;; than a lambda for Read Mail.
|
||||
;;(tool-bar-add-item-from-menu 'compose-mail "mail/compose")
|
||||
|
||||
|
||||
;; tool-bar-add-item-from-menu itself operates on
|
||||
;; (default-value 'tool-bar-map), but when we don't use that function,
|
||||
;; we must explicitly operate on the default value.
|
||||
|
||||
(let ((tool-bar-map (default-value 'tool-bar-map)))
|
||||
(tool-bar-add-item "help" (lambda ()
|
||||
(interactive)
|
||||
(popup-menu menu-bar-help-menu))
|
||||
'help
|
||||
:help "Pop up the Help menu")))
|
||||
;; Help button on a tool bar is rather non-standard...
|
||||
;; (let ((tool-bar-map (default-value 'tool-bar-map)))
|
||||
;; (tool-bar-add-item "help" (lambda ()
|
||||
;; (interactive)
|
||||
;; (popup-menu menu-bar-help-menu))
|
||||
;; 'help
|
||||
;; :help "Pop up the Help menu"))
|
||||
)
|
||||
|
||||
(if (featurep 'move-toolbar)
|
||||
(defcustom tool-bar-position 'top
|
||||
|
|
|
@ -196,7 +196,7 @@ See `run-hooks'."
|
|||
'(menu-item "Show Incoming Log" vc-log-incoming
|
||||
:help "Show a log of changes that will be received with a pull operation"))
|
||||
(define-key map [log]
|
||||
'(menu-item "Show history" 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 [rlog]
|
||||
'(menu-item "Show Top of the Tree History " vc-print-root-log
|
||||
|
@ -307,33 +307,36 @@ If BODY uses EVENT, it should be a variable,
|
|||
|
||||
(defvar vc-dir-tool-bar-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(tool-bar-local-item-from-menu 'vc-dir-find-file "open"
|
||||
map vc-dir-mode-map)
|
||||
(tool-bar-local-item "bookmark_add"
|
||||
'vc-dir-toggle-mark 'vc-dir-toggle-mark map
|
||||
:help "Toggle mark on current item"
|
||||
:label "Toggle Mark")
|
||||
(tool-bar-local-item-from-menu 'vc-dir-previous-line "left-arrow"
|
||||
map vc-dir-mode-map
|
||||
:rtl "right-arrow")
|
||||
(tool-bar-local-item-from-menu 'vc-dir-next-line "right-arrow"
|
||||
map vc-dir-mode-map
|
||||
:rtl "left-arrow")
|
||||
(tool-bar-local-item-from-menu 'find-file "new" map nil
|
||||
:label "New File" :vert-only t)
|
||||
(tool-bar-local-item-from-menu 'menu-find-file-existing "open" map nil
|
||||
:label "Open" :vert-only t)
|
||||
(tool-bar-local-item-from-menu 'dired "diropen" map nil
|
||||
:vert-only t)
|
||||
(tool-bar-local-item-from-menu 'quit-window "close" map vc-dir-mode-map
|
||||
:vert-only t)
|
||||
(tool-bar-local-item-from-menu 'vc-next-action "saveas" map
|
||||
vc-dir-mode-map :label "Commit")
|
||||
(tool-bar-local-item-from-menu 'vc-print-log "info"
|
||||
map vc-dir-mode-map)
|
||||
(tool-bar-local-item-from-menu 'revert-buffer "refresh"
|
||||
map vc-dir-mode-map)
|
||||
(tool-bar-local-item-from-menu 'nonincremental-search-forward
|
||||
"search" map nil
|
||||
:label "Search")
|
||||
(tool-bar-local-item-from-menu 'vc-dir-query-replace-regexp
|
||||
"search-replace" map vc-dir-mode-map
|
||||
:label "Replace")
|
||||
map vc-dir-mode-map
|
||||
:label "Log")
|
||||
(define-key-after map [separator-1] menu-bar-separator)
|
||||
(tool-bar-local-item-from-menu 'vc-dir-kill-dir-status-process "cancel"
|
||||
map vc-dir-mode-map
|
||||
:label "Cancel")
|
||||
(tool-bar-local-item-from-menu 'quit-window "exit"
|
||||
map vc-dir-mode-map)
|
||||
:label "Stop" :vert-only t)
|
||||
(tool-bar-local-item-from-menu 'revert-buffer "refresh"
|
||||
map vc-dir-mode-map :vert-only t)
|
||||
(define-key-after map [separator-2] menu-bar-separator)
|
||||
(tool-bar-local-item-from-menu (lookup-key menu-bar-edit-menu [cut])
|
||||
"cut" map nil :vert-only t)
|
||||
(tool-bar-local-item-from-menu (lookup-key menu-bar-edit-menu [copy])
|
||||
"copy" map nil :vert-only t)
|
||||
(tool-bar-local-item-from-menu (lookup-key menu-bar-edit-menu [paste])
|
||||
"paste" map nil :vert-only t)
|
||||
(define-key-after map [separator-3] menu-bar-separator)
|
||||
(tool-bar-local-item-from-menu 'isearch-forward
|
||||
"search" map nil
|
||||
:label "Search" :vert-only t)
|
||||
map))
|
||||
|
||||
(defun vc-dir-node-directory (node)
|
||||
|
|
Loading…
Add table
Reference in a new issue