home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / alt / lucidem / help / 260 < prev    next >
Encoding:
Text File  |  1992-08-13  |  5.3 KB  |  164 lines

  1. Path: sparky!uunet!mcsun!corton!loria!news.loria.fr!bosch
  2. From: bosch@loria.fr (Guido Bosch)
  3. Newsgroups: alt.lucid-emacs.help
  4. Subject: Re: Could someone send an example of a nested menu (submenu)?
  5. Message-ID: <BOSCH.92Aug13170300@moebius.loria.fr>
  6. Date: 13 Aug 92 15:03:00 GMT
  7. References: <9208122109.AA11807@pts4.pts.mot.com>
  8. Sender: news@news.loria.fr
  9. Organization: INRIA-Lorraine / CRIN, Nancy, France
  10. Lines: 151
  11. In-reply-to: ex594bw@pts.mot.com's message of 12 Aug 92 21:09:34 GMT
  12.  
  13. In article <9208122109.AA11807@pts4.pts.mot.com> ex594bw@pts.mot.com ( BOB WEINER X2087 P7489) writes:
  14.  
  15.  > The doc I've seen says one can nest menus but does not show
  16.  > the precise syntax.  The 'add-menu-item' code doc does not help either.
  17.  > A basic example would get me going.
  18.  
  19. Try this: It's the beginning of a dired mode menu I'm currently
  20. experiencing with. But I don't find it perfect yet.
  21. Maybe sombody wants to improve it ... 
  22.  
  23.  
  24. (defun dired-menu (e)
  25.   (interactive "@e")
  26.   (popup-menu dired-menu))
  27.  
  28. (define-key dired-mode-map 'button3 'dired-menu)
  29.  
  30. (setq dired-menu
  31.       '("Dired"
  32.     ["Next Line" dired-next-line t]
  33.     ["Previous Line" dired-previous-line t]
  34.  
  35.  
  36.     ("Listing Files"
  37.      ["Sort Toggle Or Edit" dired-sort-toggle-or-edit t]
  38.      ["Redisplay" dired-do-redisplay t]
  39.      ["Revert Buffer" revert-buffer t]
  40.      ["Kill Line Or Subdir" dired-kill-line-or-subdir t]
  41.      ["Kill" dired-do-kill t]
  42.      )
  43.  
  44.     ("Marking Files"
  45.      ["Mark Subdir Or File" dired-mark-subdir-or-file t]
  46.      ["Unmark Subdir Or File" dired-unmark-subdir-or-file t]
  47.      ["Backup Unflag" dired-backup-unflag t]
  48.      ["Unflag All Files" dired-unflag-all-files t]
  49.      ["Mark Executables" dired-mark-executables t]
  50.      ["Mark Symlinks" dired-mark-symlinks t]
  51.      ["Mark Directories" dired-mark-directories t]
  52.      ["Mark Rcs Files" dired-mark-rcs-files t]
  53.      ["Mark Sexp" dired-mark-sexp t]
  54.      ["Mark Files Regexp" dired-mark-files-regexp t]
  55.      ["Next Marked File" dired-next-marked-file t]
  56.      ["Prev Marked File" dired-prev-marked-file t]
  57.      )
  58.  
  59.     ("Deleting Files With Dired"
  60.      ["Flag File Deleted" dired-flag-file-deleted t]
  61.      ["Flag Regexp Files" dired-flag-regexp-files t]
  62.      ["Do Deletions" dired-do-deletions t]
  63.      ["Do Delete" dired-do-delete t]
  64.      ["Flag Auto Save Files" dired-flag-auto-save-files t]
  65.      ["Flag Backup Files" dired-flag-backup-files t]
  66.      ["Clean Directory" dired-clean-directory t])
  67.  
  68.     ("Dired Shell Commands"
  69.      
  70.      ["Shell Command" dired-do-shell-command t]
  71.      ["Do Background Shell Command" dired-do-background-shell-command t]
  72.      ["Compress" dired-do-compress t]
  73.      ["Uncompress" dired-do-uncompress t]
  74.      "----"
  75.      ["Chmod" dired-do-chmod t]
  76.      ["Chgrp" dired-do-chgrp t]
  77.      ["Chown" dired-do-chown t]
  78.      "----"
  79.      ["Load" dired-do-load t]
  80.      ["Do Byte Compile" dired-do-byte-compile t]
  81.      ["Byte Compile And Load" dired-do-byte-compile-and-load t]
  82.      "----"
  83.      ["Print" dired-do-print t])
  84.  
  85.     ("Mark-using Commands"
  86.      "Copy and Move Into a Directory"
  87.      ["Copy Regexp" dired-do-copy-regexp t]
  88.      ["Move" dired-do-move t]
  89.      ["Hardlink Regexp" dired-do-hardlink-regexp t]
  90.      ["Symlink Regexp" dired-do-symlink-regexp t]
  91.      "-----"
  92.      "Renaming and More With Regexps"
  93.      ["Rename Regexp" dired-do-rename-regexp t]
  94.      "----"
  95.      "Other File Creating Commands"
  96.      ["Upcase" dired-upcase t]
  97.      ["Downcase" dired-downcase t])
  98.  
  99.     ("Commands That Do Not Use Marks"
  100.      ["Find File" dired-find-file t]
  101.      ["Advertised Find File" dired-advertised-find-file t]
  102.      ["Find File Other Window" dired-find-file-other-window t]
  103.      ["View File" dired-view-file t]
  104.      ["Diff" dired-diff t]
  105.      ["Backup Diff" dired-backup-diff t]
  106.      ["Create Directory" dired-create-directory t]
  107.      ["Why" dired-why t])
  108.  
  109.     ("Subdirectories in Dired"
  110.      ["Insert Subdir" dired-do-insert-subdir t]
  111.      ["Insert Subdir Inline" dired-insert-subdir-inline t]
  112.      ["Maybe Insert Subdir" dired-maybe-insert-subdir t]
  113.      ["Next Subdir" dired-next-subdir t]
  114.      ["Prev Subdir" dired-prev-subdir t]
  115.      ["Goto Subdir" dired-goto-subdir t]
  116.      ["Prev Dirline" dired-prev-dirline t]
  117.      ["Next Dirline" dired-next-dirline t]
  118.      ["Up Directory" dired-up-directory t]
  119.      )
  120.  
  121.     ("Hiding Directories in Dired"
  122.      ["Hide Subdir" dired-hide-subdir t]
  123.      ["Hide All" dired-hide-all t])
  124.  
  125.     ["Undo" dired-undo t]
  126.     ["Quit" dired-quit t]
  127.     ))
  128.  
  129.  
  130.  
  131. ; Commands not yet inserted.
  132. ;["Do Relsymlink Regexp" dired-do-relsymlink-regexp t]
  133. ;["Set Marker Char" dired-set-marker-char t]
  134. ;["Restore Marker Char" dired-restore-marker-char t]
  135. ;["Summary" dired-summary t]
  136. ;["Do Find File" dired-do-find-file t]
  137. ;["Do Hardlink" dired-do-hardlink t]
  138. ;["Do Relsymlink" dired-do-relsymlink t]
  139. ;["Do Toggle" dired-do-toggle t]
  140. ;["Vm" dired-vm t]
  141. ;["Do Symlink" dired-do-symlink t]
  142. ;["Mark With This Char" dired-mark-with-this-char t]
  143. ;["Do Copy" dired-do-copy t]
  144. ;["Describe Mode" describe-mode t]
  145. ;["Copy Filename As Kill" dired-copy-filename-as-kill t]
  146. ;["Smart Shell Command" dired-smart-shell-command t]
  147. ;["Tree Up" dired-tree-up t]
  148. ;["Tree Down" dired-tree-down t]
  149. ;["Goto File" dired-goto-file t]
  150. ;["Do Unmark" dired-do-unmark t]
  151. ;["Smart Background Shell Command" dired-smart-background-shell-command t]
  152. ;["Omit Toggle" dired-omit-toggle t]
  153. ;
  154. --
  155. Guido BOSCH, INRIA-Lorraine/CRIN
  156. Institut National de Recherche en Informatique et en Automatique (INRIA)
  157. Centre de Recherche en Informatique de Nancy (CRIN)
  158. Campus scientifique, B.P. 239            
  159. 54506 Vandoeuvre-les-Nancy CEDEX           
  160. Tel.: (+33) 83.91.24.24
  161. Fax.: (+33) 83.41.30.79                    
  162. email: bosch@loria.fr                 
  163.