home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / alt / lucidem / help / 681 < prev    next >
Encoding:
Text File  |  1992-11-11  |  4.1 KB  |  118 lines

  1. Path: sparky!uunet!charon.amdahl.com!amdahl!JUTS!climb!tlp00
  2. From: tlp00@climb.as (Tibor Polgar)
  3. Newsgroups: alt.lucid-emacs.help
  4. Subject: Dired Goodies
  5. Message-ID: <b8bx02xv2aLK01@JUTS.ccc.amdahl.com>
  6. Date: 12 Nov 92 03:50:48 GMT
  7. Sender: netnews@ccc.amdahl.com
  8. Reply-To: tlp00@climb.as
  9. Organization: Sun Microsystems
  10. Lines: 106
  11.  
  12. Since pop-up menus and mode motion are so great, here are some goodies to make them
  13. more useful for dired.
  14.  
  15. -------------------------------------------------------------------------------------;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  16. ;;
  17. ;; Nice dired hooks
  18. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  19.                     
  20. (add-hook 'dired-mode-hook
  21.              '(lambda ()
  22.          (require 'mode-motion)
  23.          (setq mode-motion-hook 'mode-motion-highlight-line)
  24.              (define-key dired-mode-map 'button2
  25.                     '(lambda () (interactive)
  26.                       (mouse-set-point last-command-event)
  27.                   (dired-find-file)
  28.               ))
  29.              (define-key dired-mode-map 'button3 
  30.                  '(lambda () (interactive)
  31.                     (mouse-set-point last-command-event)
  32.                 (setq zmacs-region-stays t)
  33.                 (popup-menu 'dired-popup)
  34.               ))
  35. ))
  36.  
  37.  
  38. (defvar dired-popup
  39.  '("Dired-Menu"
  40.     ["Edit File/Directory" dired-find-file t]
  41.     ["Edit Other Window" dired-find-file-other-window t]
  42.     ["View File" dired-view-file t]
  43.     ["Create Directory" dired-create-directory t]
  44.     ["Copy" dired-do-copy t]
  45.     ["Move File" dired-do-move t]
  46.     ["Print File" dired-do-print t]
  47.     "----"
  48.     ["Mark Subdir Or File" dired-mark-subdir-or-file t]
  49.     ["Flag File Deleted" dired-flag-file-deleted t]
  50.     ["Flag Auto Save Files" dired-flag-auto-save-files t]
  51.     ["Flag Backup Files" dired-flag-backup-files t]
  52.     ["Unflag Backup" dired-backup-unflag t]
  53.     ["Unflag All Files" dired-unflag-all-files t]
  54.     ["Unflag Subdir Or File" dired-unmark-subdir-or-file t]
  55.     "----"
  56.     ["Undo last mark" dired-undo t]
  57.     ["Delete Flaged Files" dired-do-deletions t]
  58.     "----"
  59.     ["Re-Read Directory" revert-buffer t]
  60.     ["Toggle Dir sort name/date" dired-sort-toggle-or-edit t]
  61.     ["Shell Command" dired-do-shell-command t]
  62.     ["Up Directory" dired-up-directory t]
  63.  ("File Management"
  64.     ["Compress" dired-do-compress t]
  65.     ["Chgrp" dired-do-chgrp t]
  66.     ["Chmod" dired-do-chmod t]
  67.     ["Chown" dired-do-chown t]
  68.     ["Hardlink" dired-do-hardlink t]
  69.     ["Symlink" dired-do-symlink t]
  70.     ["Uncompress" dired-do-uncompress t]
  71.     "----"
  72.     ["Mark Directories" dired-mark-directories t]
  73.     ["Mark Executables" dired-mark-executables t]
  74.     ["Mark Subdir Or File" dired-mark-subdir-or-file t]
  75.     ["Mark Symlinks" dired-mark-symlinks t]
  76.     ["Unmark Subdir Or File" dired-unmark-subdir-or-file t]
  77.     )
  78.  ("Special"
  79.     ["Byte Compile" dired-do-byte-compile t]
  80.     ["Load Elisp File" dired-do-load t]
  81.     ["Downcase Marked Filenames" dired-downcase t]
  82.     ["Upcase Marked Filenames" dired-upcase t]
  83.     ["Backup Diff" dired-backup-diff t]
  84.     ["Diff" dired-diff t]
  85.     )
  86.  ("More 1" 
  87.     ["Clean Directory" dired-clean-directory t]
  88.     ["Kill" dired-do-kill t]
  89.     ["Hide All" dired-hide-all t]
  90.     ["Hide Subdir" dired-hide-subdir t]
  91.     ["Kill Line Or Subdir" dired-kill-line-or-subdir t]
  92.     ["Maybe Insert Subdir" dired-maybe-insert-subdir t]
  93.     ["Next Dirline" dired-next-dirline t]
  94.     ["Next Line" dired-next-line t]
  95.     ["Next Marked File" dired-next-marked-file t]
  96.     ["Next Subdir" dired-next-subdir t]
  97.     ["Prev Dirline" dired-prev-dirline t]
  98.     ["Prev Marked File" dired-prev-marked-file t]
  99.     ["Prev Subdir" dired-prev-subdir t]
  100.     ["Previous Line" dired-previous-line t]
  101.     )
  102.  ("More 2"    
  103.     ["Quit" dired-quit t]
  104.     ["Redisplay" dired-do-redisplay t]
  105.     ["Summary" dired-summary t]
  106.     ["Tree Down" dired-tree-down t]
  107.     ["Tree Up" dired-tree-up t]
  108.     ["Undo" dired-undo t]
  109.     ["Why" dired-why t])
  110.  ("% Prefix"    
  111.     ["Copy Regexp" dired-do-copy-regexp t]
  112.     ["Hardlink Regexp" dired-do-hardlink-regexp t]
  113.     ["Rename Regexp" dired-do-rename-regexp t]
  114.     ["Symlink Regexp" dired-do-symlink-regexp t]
  115.     ["Flag Regexp Files" dired-flag-regexp-files t]
  116.     ["Mark Files Regexp" dired-mark-files-regexp t])
  117. ))
  118.