mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-21 18:23:59 +00:00
* lisp/dired-x.el: Use easymenu for menu items. Fix item capitalization.
This commit is contained in:
parent
bb55f713d2
commit
c5ca3aa008
@ -1,3 +1,7 @@
|
||||
2011-02-15 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* dired-x.el: Use easymenu for menu items. Fix item capitalization.
|
||||
|
||||
2011-02-14 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* vc/vc-git.el (vc-git-root-log-format): New option for
|
||||
|
101
lisp/dired-x.el
101
lisp/dired-x.el
@ -231,69 +231,44 @@ to nil: a pipe using `zcat' or `gunzip -c' will be used."
|
||||
|
||||
;;; MENU BINDINGS
|
||||
|
||||
(let ((menu-bar (lookup-key dired-mode-map [menu-bar])))
|
||||
(let ((menu (lookup-key menu-bar [operate])))
|
||||
(define-key-after
|
||||
menu
|
||||
[find-files]
|
||||
'(menu-item
|
||||
"Find files"
|
||||
dired-do-find-marked-files
|
||||
:help "Find current or marked files")
|
||||
'delete)
|
||||
(define-key-after
|
||||
menu
|
||||
[relsymlink]
|
||||
'(menu-item
|
||||
"Relative symlink to..."
|
||||
dired-do-relsymlink
|
||||
:visible (fboundp 'make-symbolic-link)
|
||||
:help "Make relative symbolic links for current or marked files")
|
||||
'symlink))
|
||||
(let ((menu (lookup-key menu-bar [mark])))
|
||||
(define-key-after
|
||||
menu
|
||||
[flag-extension]
|
||||
'(menu-item
|
||||
"Flag extension..."
|
||||
dired-flag-extension
|
||||
:help "Flag files with a certain extension for deletion")
|
||||
'garbage-files)
|
||||
(define-key-after
|
||||
menu
|
||||
[mark-extension]
|
||||
'(menu-item
|
||||
"Mark extension..."
|
||||
dired-mark-extension
|
||||
:help "Mark files with a certain extension")
|
||||
'symlinks)
|
||||
(define-key-after
|
||||
menu
|
||||
[mark-omitted]
|
||||
'(menu-item
|
||||
"Mark omitted"
|
||||
dired-mark-omitted
|
||||
:help "Mark files matching `dired-omit-files' and `dired-omit-extensions'")
|
||||
'mark-extension))
|
||||
(let ((menu (lookup-key menu-bar [regexp])))
|
||||
(define-key-after
|
||||
menu
|
||||
[relsymlink-regexp]
|
||||
'(menu-item
|
||||
"Relative symlink..."
|
||||
dired-do-relsymlink-regexp
|
||||
:visible (fboundp 'make-symbolic-link)
|
||||
:help "Make relative symbolic links for files matching regexp")
|
||||
'symlink))
|
||||
(let ((menu (lookup-key menu-bar [immediate])))
|
||||
(define-key-after
|
||||
menu
|
||||
[omit-mode]
|
||||
'(menu-item
|
||||
"Omit mode" dired-omit-mode
|
||||
:button (:toggle . dired-omit-mode)
|
||||
:help "Enable or disable omitting \"uninteresting\" files")
|
||||
'dashes)))
|
||||
(require 'easymenu)
|
||||
|
||||
(let ((menu (lookup-key dired-mode-map [menu-bar])))
|
||||
(easy-menu-add-item menu '("Operate")
|
||||
["Find Files" dired-do-find-marked-files
|
||||
:help "Find current or marked files"]
|
||||
"Shell Command...")
|
||||
(easy-menu-add-item menu '("Operate")
|
||||
["Relative Symlink to..." dired-do-relsymlink
|
||||
:visible (fboundp 'make-symbolic-link)
|
||||
:help "Make relative symbolic links for current or \
|
||||
marked files"]
|
||||
"Hardlink to...")
|
||||
(easy-menu-add-item menu '("Mark")
|
||||
["Flag Extension..." dired-flag-extension
|
||||
:help "Flag files with a certain extension for deletion"]
|
||||
"Mark Executables")
|
||||
(easy-menu-add-item menu '("Mark")
|
||||
["Mark Extension..." dired-mark-extension
|
||||
:help "Mark files with a certain extension"]
|
||||
"Unmark All")
|
||||
(easy-menu-add-item menu '("Mark")
|
||||
["Mark Omitted" dired-mark-omitted
|
||||
:help "Mark files matching `dired-omit-files' \
|
||||
and `dired-omit-extensions'"]
|
||||
"Unmark All")
|
||||
(easy-menu-add-item menu '("Regexp")
|
||||
["Relative Symlink..." dired-do-relsymlink-regexp
|
||||
:visible (fboundp 'make-symbolic-link)
|
||||
:help "Make relative symbolic links for files \
|
||||
matching regexp"]
|
||||
"Hardlink...")
|
||||
(easy-menu-add-item menu '("Immediate")
|
||||
["Omit Mode" dired-omit-mode
|
||||
:style toggle :selected dired-omit-mode
|
||||
:help "Enable or disable omitting \"uninteresting\" \
|
||||
files"]
|
||||
"Refresh"))
|
||||
|
||||
;;; GLOBAL BINDING.
|
||||
(when dired-bind-jump
|
||||
|
Loading…
Reference in New Issue
Block a user