Mercurial > emacs
changeset 66659:ca5365d36237
Add menu bindings for dired-do-find-marked-files,
dired-do-relsymlink, dired-flag-extension, dired-mark-extension,
dired-mark-omitted, dired-do-relsymlink-regexp, dired-omit-mode.
author | Lars Hansen <larsh@soem.dk> |
---|---|
date | Thu, 03 Nov 2005 19:40:22 +0000 |
parents | f2ef41c440de |
children | b5ed69925019 |
files | lisp/dired-x.el |
diffstat | 1 files changed, 66 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/dired-x.el Thu Nov 03 17:14:11 2005 +0000 +++ b/lisp/dired-x.el Thu Nov 03 19:40:22 2005 +0000 @@ -261,6 +261,72 @@ (if dired-bind-info (define-key dired-mode-map "I" 'dired-info)) +;;; 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))) + ;;; GLOBAL BINDING. (if dired-bind-jump (progn