annotate lisp/efs/dired-help.el @ 200:f0deb0c0e6be

Added tag r20-3b26 for changeset 169c0442b401
author cvs
date Mon, 13 Aug 2007 10:00:35 +0200
parents 9f59509498e1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
2 ;;
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
3 ;; File: dired-help.el
116
9f59509498e1 Import from CVS: tag r20-1b10
cvs
parents: 22
diff changeset
4 ;; Dired Version: #Revision: 7.9 $
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
5 ;; RCS:
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
6 ;; Description: Obtaining help for dired
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
7 ;; Modified: Sun Nov 20 21:10:47 1994 by sandy on gandalf
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
8 ;;
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
9 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
10
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
11 ;;; Requirements and provisions
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
12 (provide 'dired-help)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
13 (require 'dired)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
14 (autoload 'reporter-submit-bug-report "reporter")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
15 (defvar reporter-version) ; For the byte-compiler.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
16
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
17 ;;; Constants
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
18
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
19 (defconst dired-bug-address "efs-bugs@cuckoo.hpl.hp.com")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
20
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
21 (defvar dired-documentation nil)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
23 ;;; Functions
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
24
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
25 (defun dired-documentation ()
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
26 (or dired-documentation
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
27 (let ((18-p (string-equal "18." (substring emacs-version 0 3)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
28 (var-help-key (substitute-command-keys
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
29 (if (featurep 'ehelp)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
30 "\\[electric-describe-variable]"
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
31 "\\[describe-variable]")))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
32 (standard-output (get-buffer-create " dired-help-temp")))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
33 (save-excursion
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
34 (set-buffer standard-output)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
35 (unwind-protect
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
36 (setq dired-documentation
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
37 (substitute-command-keys
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
38 (format "\\<dired-mode-map>The Directory Editor:
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
39
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
40 For more detailed help, type \\[universal-argument] \\[dired-describe-mode] to start the info
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
41 documentation browser.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
42
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
43 In dired, you can edit a list of the files in a directory \(and optionally
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
44 its subdirectories in the `ls -lR' format\).
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
45
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
46 Editing a directory means that you can visit, rename, copy, compress,
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
47 load, byte-compile files. You can change files' attributes, run shell
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
48 commands on files, or insert subdirectories into the edit buffer. You can
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
49 \"flag\" files for deletion or \"mark\" files for later commands, either one
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
50 file at a time or by all files matching certain criteria \(e.g., files that
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
51 match a certain regexp\).
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
52
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
53 You move throughout the buffer using the usual cursor motion commands.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
54 Letters no longer insert themselves, but execute commands instead. The
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
55 digits (0-9) are prefix arguments.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
56
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
57 Most commands operate either on all marked files or on the current file if
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
58 no files are marked. Use a numeric prefix argument to operate on the next
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
59 ARG files (or previous ARG if ARG < 0). Use the prefix argument `1' to
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
60 operate on the current file only. Prefix arguments override marks. Commands
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
61 which run a sub-process on a group of files will display a list of files
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
62 for which the sub-process failed. Typing \\[dired-why] will try to tell
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
63 you what went wrong.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
64
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
65 When editing several directories in one buffer, each directory acts as a
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
66 page, so \\[backward-page] and \\[forward-page] can be used to move between directories.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
67
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
68 Summary of commands:
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
69
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
70 Motion Commands
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
71 move up to previous line \\[dired-next-line]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
72 move down to next line \\[dired-previous-line]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
73 move up to previous directory line \\[dired-prev-dirline]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
74 move down to next directory line \\[dired-next-dirline]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
75 move up to previous subdirectory \\[dired-advertised-prev-subdir]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
76 move down to next subdirectory \\[dired-advertised-next-subdir]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
77 move to parent directory \\[dired-up-directory]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
78 move to first child subdirectory \\[dired-down-directory]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
79
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
80 Immediate Actions on Files
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
81 visit current file \\[dired-advertised-find-file]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
82 visit current file in other window \\[dired-find-file-other-window]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
83 visit current file in other frame %s
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
84 display current file \\[universal-argument] \\[dired-find-file-other-window]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
85 create a new subdirectory \\[dired-create-directory]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
86 recover file from auto-save \\[dired-recover-file]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
87
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
88 Marking & Unmarking Files
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
89 mark a file or subdirectory for later commands \\[dired-mark]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
90 unmark a file or all files of a subdirectory \\[dired-unmark]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
91 unmark all marked files in a buffer \\[dired-unmark-all-files]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
92 count marks in buffer 0 \\[dired-unmark-all-files]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
93 mark all directories \\[dired-mark-directories]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
94 mark all executable files \\[dired-mark-executables]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
95 mark file names matching a regular expression \\[dired-mark-files-regexp]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
96
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
97 Commands on Files Marked or Specified by the Prefix
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
98 rename a file or move files to another directory \\[dired-do-rename]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
99 copy files \\[dired-do-copy]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
100 delete marked (as opposed to flagged) files \\[dired-do-delete]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
101 compress or uncompress files \\[dired-do-compress]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
102 uuencode or uudecode files \\[dired-do-uucode]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
103 grep files \\[dired-do-grep]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
104 search for regular expression \\[dired-do-tags-search]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
105 query replace by regular expression \\[dired-do-tags-query-replace]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
106 byte-compile files \\[dired-do-byte-compile]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
107 load files \\[dired-do-load]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
108 shell command on files \\[dired-do-shell-command]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
109 operate shell command separately on each file \\[universal-argument] \\[dired-do-shell-command]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
110 do as above, but in each file's directory \\[universal-argument] \\[universal-argument] \\[dired-do-shell-command]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
111
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
112 Flagging Files for Deletion (unmark commands remove delete flags)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
113 flag file for deletion \\[dired-flag-file-deletion]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
114 backup and remove deletion flag \\[dired-backup-unflag]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
115 flag all backup files (file names ending in ~) \\[dired-flag-backup-files]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
116 flag all auto-save files \\[dired-flag-auto-save-files]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
117 clean directory of numeric backups \\[dired-clean-directory]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
118 execute the deletions requested (flagged files) \\[dired-expunge-deletions]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
119
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
120 Modifying the Dired Buffer
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
121 insert a subdirectory in this buffer \\[dired-maybe-insert-subdir]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
122 removing a subdir listing \\[dired-kill-subdir]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
123 relist single file, marked files, or subdir \\[dired-do-redisplay]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
124 re-read all directories (retains all marks) \\[revert-buffer]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
125 toggle sorting of current subdir by name/date \\[dired-sort-toggle-or-edit]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
126 report on current ls switches 0 \\[dired-sort-toggle-or-edit]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
127 edit ls switches for current subdir 1 \\[dired-sort-toggle-or-edit]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
128 edit default ls switches for new subdirs 2 \\[dired-sort-toggle-or-edit]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
129 sort all subdirs by name/date \\[universal-argument] \\[dired-sort-toggle-or-edit]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
130 edit the ls switches for all subdirs \\[universal-argument] \\[universal-argument] \\[dired-sort-toggle-or-edit]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
131
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
132 Hiding File Lines
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
133 toggle file omission in current subdir \\[dired-omit-toggle]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
134 kill marked file lines \\[dired-do-kill-file-lines]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
135
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
136 Help on Dired
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
137 dired help (what you're reading) \\[dired-describe-mode]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
138 dired summary (short help) \\[dired-summary]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
139 dired info (full dired info manual) \\[universal-argument] \\[dired-describe-mode]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
140 apropos for dired commands \\[dired-apropos]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
141 apropos for dired variables \\[universal-argument] \\[dired-apropos]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
142
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
143 Regular Expression Commands
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
144 mark files with a regular expression \\[dired-mark-files-regexp]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
145 copy marked files by regexp \\[dired-do-copy-regexp]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
146 rename marked files by regexp \\[dired-do-rename-regexp]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
147 omit files by regexp \\[dired-omit-expunge]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
148 downcase file names (rename to lowercase) \\[dired-downcase]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
149 upcase files names (rename to uppercase) \\[dired-upcase]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
150
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
151 Comparing Files
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
152 diff file at point with file at mark \\[dired-diff]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
153 diff file with its backup \\[dired-backup-diff]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
154 merge file at point with file at mark \\[dired-emerge]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
155 same as above but use a common ancestor \\[dired-emerge-with-ancestor]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
156 ediff file at point with file at mark \\[dired-ediff]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
157 patch file at point \\[dired-epatch]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
158
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
159 Mouse Commands
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
160 %s
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
161
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
162 Miscellaneous
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
163 quit dired \\[dired-quit]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
164 insert current directory in minibuffer \\[dired-get-target-directory]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
165
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
166 If the dired buffer gets confused, you can either type \\[revert-buffer] to read all
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
167 directories again, type \\[dired-do-redisplay] to relist a single file, the marked
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
168 files, or a subdirectory, or type \\[dired-build-subdir-alist] to parse
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
169 the directory tree in the buffer again.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
170
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
171 Customization Variables:
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
172 Use %s to obtain more information.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
173
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
174 %s
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
175
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
176 Hook Variables:
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
177 Use %s to obtain more information.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
178
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
179 %s
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
180
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
181 Keybindings:
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
182 \\{dired-mode-map}"
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
183
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
184 ;; arguments to format
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
185 (if 18-p
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
186 "Unavailable in Emacs 18"
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
187 " \\[dired-find-file-other-frame]")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
188 (if 18-p
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
189 " Unavailable in Emacs 18"
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
190 "\
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
191 find file with mouse \\[dired-mouse-find-file]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
192 mark file at mouse \\[dired-mouse-mark]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
193 flag for deletion file at mouse \\[dired-mouse-flag]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
194 menu of commands to visit a file \\[dired-visit-popup-menu]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
195 menu of operations to do on a file \\[dired-do-popup-menu]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
196 insert directory of mouse in minibuffer \\[dired-mouse-get-target]
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
197 ")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
198 var-help-key
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
199 (progn
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
200 (erase-buffer)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
201 (dired-format-columns-of-files
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
202 (sort
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
203 (all-completions
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
204 "dired-" obarray
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
205 (function
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
206 (lambda (sym)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
207 (and (user-variable-p sym)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
208 (not (dired-hook-variable-p
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
209 sym))))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
210 'string<) t)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
211 (buffer-string))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
212 var-help-key
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
213 (progn
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
214 (erase-buffer)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
215 (dired-format-columns-of-files
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
216 (sort
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
217 (all-completions
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
218 "dired-" obarray
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
219 (function
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
220 (lambda (sym)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
221 (dired-hook-variable-p sym))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
222 'string<) t)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
223 (buffer-string)))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
224 (kill-buffer " dired-help-temp"))))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
225
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
226 ;;; Commands
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
227
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
228 (defun dired-describe-mode (&optional info)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
229 "Detailed description of dired mode.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
230 With a prefix, runs the info documentation browser for dired."
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
231 (interactive "P")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
232 ;; Getting dired documentation can be a bit slow.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
233 (if info
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
234 (info "dired")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
235 (message "Building dired help...")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
236 (let* ((buff (get-buffer-create "*Help*"))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
237 (standard-output buff)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
238 (mess (dired-documentation)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
239 (message "Building dired help... done")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
240 (if (featurep 'ehelp)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
241 (with-electric-help
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
242 (function
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
243 (lambda ()
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
244 (princ mess)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
245 nil))) ; return nil so ehelp puts us at the top of the buffer.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
246 (with-output-to-temp-buffer (buffer-name buff)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
247 (princ mess)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
248 (print-help-return-message))))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
249
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
250 (defun dired-apropos (string &optional var-p)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
251 "Does command apropos for dired commands.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
252 With prefix does apropos for dired variables."
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
253 (interactive
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
254 (list
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
255 (if current-prefix-arg
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
256 (read-string "Dired variable apropos (regexp): ")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
257 (read-string "Dired command apropos (regexp): "))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
258 current-prefix-arg))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
259 (message "Doing dired %s apropos..." (if var-p "variable" "command"))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
260 (if (featurep 'ehelp)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
261 (with-electric-help
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
262 (function
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
263 (lambda ()
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
264 (dired-apropos-internal string var-p)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
265 nil)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
266 (with-output-to-temp-buffer "*Help*"
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
267 (dired-apropos-internal string var-p)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
268 (or (print-help-return-message)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
269 (message "Doing dired %s apropos...done"
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
270 (if var-p "variable" "command"))))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
271
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
272 (defun dired-apropos-internal (string &optional var-p)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
273 (let ((case-fold-search t)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
274 (names (sort (all-completions "dired-" obarray
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
275 (if var-p
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
276 'user-variable-p
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
277 'commandp))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
278 'string<))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
279 doc)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
280 (mapcar
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
281 (function
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
282 (lambda (x)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
283 (and (if var-p (user-variable-p (intern x)) (commandp (intern x)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
284 (progn
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
285 (setq doc (if var-p
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
286 (get (intern x) 'variable-documentation)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
287 (documentation (intern x))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
288 (and doc (setq doc (substring doc 0 (string-match "\n" doc))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
289 (or (string-match string x)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
290 (and doc (string-match string doc))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
291 (progn
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
292 (princ x)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
293 (if var-p (princ " <V>:")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
294 (princ " <F>:")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
295 (princ (make-string (max 2 (- 30 (length x))) ?\ ))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
296 (princ (dired-help-key-description (intern x))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
297 (princ "\n ")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
298 (princ doc)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
299 (princ "\n")))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
300 names)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
301
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
302 (defun dired-help-key-description (fun)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
303 ;; Returns a help string of keys for fun.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
304 (let ((res (mapconcat 'key-description
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
305 (where-is-internal fun dired-mode-map) ", ")))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
306 (if (string-equal res "")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
307 "\(not on any keys\)"
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
308 res)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
309
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
310 (defun dired-summary ()
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
311 "Display summary of basic dired commands in the minibuffer."
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
312 (interactive)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
313 (let ((del (where-is-internal 'dired-flag-file-deletion dired-mode-map))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
314 (und (where-is-internal 'dired-unmark dired-mode-map))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
315 (exp (where-is-internal 'dired-expunge-deletions dired-mode-map))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
316 (fin (where-is-internal 'dired-advertised-find-file dired-mode-map))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
317 (oth (where-is-internal 'dired-find-file-other-window dired-mode-map))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
318 (ren (where-is-internal 'dired-do-rename dired-mode-map))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
319 (cop (where-is-internal 'dired-do-copy dired-mode-map))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
320 (hel (where-is-internal 'dired-describe-mode dired-mode-map)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
321 (if (member "d" del)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
322 (setq del "d-elete")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
323 (setq del (substitute-command-keys
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
324 "\\<dired-mode-map>\\[dired-flag-file-deletion] delete")))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
325 (if (member "u" und)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
326 (setq und "u-ndelete")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
327 (setq und (substitute-command-keys
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
328 "\\<dired-mode-map>\\[dired-unmark] undelete")))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
329 (if (member "x" exp)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
330 (setq exp "x-punge")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
331 (setq exp (substitute-command-keys
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
332 "\\<dired-mode-map>\\[dired-expunge-deletions] expunge")))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
333 (if (member "f" fin)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
334 (setq fin "f-ind")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
335 (setq fin (substitute-command-keys
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
336 "\\<dired-mode-map>\\[dired-advertised-find-file] find")))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
337 (if (member "o" oth)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
338 (setq oth "o-ther window")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
339 (setq oth
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
340 (substitute-command-keys
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
341 "\\<dired-mode-map>\\[dired-find-file-other-window] other window")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
342 ))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
343 (if (member "R" ren)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
344 (setq ren "R-ename")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
345 (setq ren (substitute-command-keys
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
346 "\\<dired-mode-map>\\[dired-do-rename] rename")))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
347 (if (member "C" cop)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
348 (setq cop "C-opy")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
349 (setq cop (substitute-command-keys
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
350 "\\<dired-mode-map>\\[dired-do-copy] copy")))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
351 (if (member "h" hel)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
352 (setq hel "h-elp")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
353 (setq hel (substitute-command-keys
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
354 "\\<dired-mode-map>\\[describe-mode] help")))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
355 (message "%s, %s, %s, %s. %s, %s, %s, %s"
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
356 del und exp fin oth ren cop hel)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
357
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
358 (defun dired-hook-variable-p (sym)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
359 ;; Returns t if SYM is a hook variable. Just looks at its name.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
360 (let ((name (symbol-name sym)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
361 (and (>= (length name) 6)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
362 (or (string-equal (substring name -5) "-hook")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
363 (string-equal (substring name -6) "-hooks")))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
364
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
365 ;;; Submitting bug reports.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
366
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
367 (defun dired-report-bug ()
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
368 "Submit a bug report for dired."
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
369 (interactive)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
370 (let ((reporter-prompt-for-summary-p t))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
371 (or (boundp 'reporter-version)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
372 (setq reporter-version
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
373 "Your version of reporter is obsolete. Please upgrade."))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
374 (reporter-submit-bug-report
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
375 dired-bug-address "Dired"
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
376 (cons
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
377 'dired-version
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
378 (nconc
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
379 (mapcar
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
380 'intern
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
381 (sort
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
382 (let (completion-ignore-case)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
383 (all-completions "dired-" obarray 'user-variable-p))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
384 'string-lessp))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
385 (list 'reporter-version)))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
386 (function
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
387 (lambda ()
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
388 (save-excursion
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
389 (mail-position-on-field "subject")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
390 (beginning-of-line)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
391 (skip-chars-forward "^:\n")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
392 (if (looking-at ": Dired;")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
393 (progn
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
394 (goto-char (match-end 0))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
395 (delete-char -1)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
396 (insert " " dired-version " bug:")))))))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
397
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
398 ;;; end of dired-help.el