]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/dired-x.el: Use easymenu for menu items. Fix item capitalization.
authorGlenn Morris <rgm@gnu.org>
Tue, 15 Feb 2011 05:09:54 +0000 (21:09 -0800)
committerGlenn Morris <rgm@gnu.org>
Tue, 15 Feb 2011 05:09:54 +0000 (21:09 -0800)
lisp/ChangeLog
lisp/dired-x.el

index 742cbfc92679f81059f9d77f914cf0dbd2fd427f..a9adce5a3f5cabe6d015a3ccc00c3b1c677173eb 100644 (file)
@@ -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
index 8011b4d32a49200e679201d11de6b3da0fcd4e96..95381ccdc0cca85337d805d88366066d72db2c63 100644 (file)
@@ -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