aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Love2001-01-03 21:21:20 +0000
committerDave Love2001-01-03 21:21:20 +0000
commitb847eb8c8db9cf87124ed11e0f14768465494d4d (patch)
treed46611a7e484a40cae3ecc3f6b9f3f04ee803094
parent99f2fb1f868867b749caca5479b985b22fed16a5 (diff)
downloademacs-b847eb8c8db9cf87124ed11e0f14768465494d4d.tar.gz
emacs-b847eb8c8db9cf87124ed11e0f14768465494d4d.zip
Doc fixes. Maintainer change.
(dired-guess-shell-gnutar, dired-guess-shell-znew-switches): Fix :type. (dired-guess-shell-alist-default): Don't use xloadimage for PNG. (dired-guess-shell-alist-user): Customize. (dired-x-help-address): Set to bug-gnu-emacs. (dired-x-maintainer, dired-x-file, dired-x-version): Deleted. (dired-default-directory): Renamed from default-directory.
-rw-r--r--lisp/ChangeLog13
-rw-r--r--lisp/dired-x.el309
2 files changed, 147 insertions, 175 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c3053e4f4b6..40bb86fc5b9 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,16 @@
12001-01-03 Dave Love <fx@gnu.org>
2
3 * dired-x.el: Doc fixes. Maintainer change.
4 (dired-guess-shell-gnutar, dired-guess-shell-znew-switches): Fix
5 :type.
6 (dired-guess-shell-alist-default): Don't use xloadimage for PNG.
7 (dired-guess-shell-alist-user): Customize.
8 (dired-x-help-address): Set to bug-gnu-emacs.
9 (dired-x-maintainer, dired-x-file, dired-x-version): Deleted.
10 (dired-default-directory): Renamed from default-directory.
11
12 * hl-line.el (hl-line): Doc fix.
13
12001-01-03 Karl Fogel <kfogel@red-bean.com> 142001-01-03 Karl Fogel <kfogel@red-bean.com>
2 15
3 * mail/mail-hist.el (mail-hist-text-too-long-p): Doc fix. 16 * mail/mail-hist.el (mail-hist-text-too-long-p): Doc fix.
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index 949877720f5..17a85fe6f4c 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -1,8 +1,8 @@
1;;; dired-x.el --- Sebastian Kremer's Extra DIRED hacked up for GNU Emacs19 1;;; dired-x.el --- Extra Dired functionality -*-byte-compile-dynamic: t;-*-
2 2
3;; Author: Sebastian Kremer <sk@thp.uni-koeln.de> 3;; Author: Sebastian Kremer <sk@thp.uni-koeln.de>
4;; Lawrence R. Dodd <dodd@roebling.poly.edu> 4;; Lawrence R. Dodd <dodd@roebling.poly.edu>
5;; Maintainer: Lawrence R. Dodd <dodd@roebling.poly.edu> 5;; Maintainer: FSF (unless Dodd can be found)
6;; Version: 2.37+ 6;; Version: 2.37+
7;; Date: 1994/08/18 19:27:42 7;; Date: 1994/08/18 19:27:42
8;; Keywords: dired extensions 8;; Keywords: dired extensions
@@ -56,21 +56,7 @@
56;; At load time dired-x.el will install itself, redefine some functions, and 56;; At load time dired-x.el will install itself, redefine some functions, and
57;; bind some dired keys. *Please* see the info pages for more details. 57;; bind some dired keys. *Please* see the info pages for more details.
58 58
59;; CAUTION: If you are using a version of GNU Emacs earlier than 19.20 than 59;; *Please* see the info pages for more details.
60;; you may have to edit dired.el. The copy of dired.el in GNU Emacs versions
61;; earlier than 19.20 incorrectly had the call to run-hooks *before* the call
62;; to provide. In such a case, it is possible that byte-compiling and/or
63;; loading dired can cause an infinite loop. To prevent this, make sure the
64;; line of code
65;;
66;; (run-hooks 'dired-load-hook)
67;;
68;; is the *last* executable line in the file dired.el. That is, make sure it
69;; comes *after* the line
70;;
71;; (provide 'dired)
72;;
73;; *Please* see the info pages for more details.
74 60
75;; User defined variables: 61;; User defined variables:
76;; 62;;
@@ -79,7 +65,7 @@
79;; dired-bind-jump 65;; dired-bind-jump
80;; dired-bind-info 66;; dired-bind-info
81;; dired-bind-man 67;; dired-bind-man
82;; dired-x-hands-off-my-keys 68;; dired-x-hands-off-my-keys
83;; dired-find-subdir 69;; dired-find-subdir
84;; dired-enable-local-variables 70;; dired-enable-local-variables
85;; dired-local-variables-file 71;; dired-local-variables-file
@@ -107,14 +93,6 @@
107;; 93;;
108;; dired-add-entry ../lisp/dired-aux.el 94;; dired-add-entry ../lisp/dired-aux.el
109;; dired-read-shell-command ../lisp/dired-aux.el 95;; dired-read-shell-command ../lisp/dired-aux.el
110;;
111;; One drawback is that dired-x.el will load dired-aux.el as soon as dired is
112;; loaded. Thus, the advantage of separating out non-essential dired stuff
113;; into dired-aux.el and only loading when necessary will be lost. Please
114;; note also that some of the comments in dired.el and dired-aux.el are
115;; Kremer's that referred to the old dired-x.el. This now should be referring
116;; to this program. (This is also a good reason to call this dired-x.el
117;; instead of dired-x19.el.)
118 96
119 97
120;;; Code: 98;;; Code:
@@ -144,29 +122,29 @@
144 :group 'dired-x) 122 :group 'dired-x)
145 123
146(defcustom dired-bind-vm nil 124(defcustom dired-bind-vm nil
147 "*t says \"V\" in dired-mode will `dired-vm', otherwise \"V\" is `dired-rmail'. 125 "*Non-nil means \"V\" runs `dired-vm', otherwise \"V\" runs `dired-rmail'.
148Also, RMAIL files contain -*- rmail -*- at the top so \"f\", 126Also, RMAIL files contain -*- rmail -*- at the top so \"f\",
149`dired-advertised-find-file', will run rmail." 127`dired-advertised-find-file', will run rmail."
150 :type 'boolean 128 :type 'boolean
151 :group 'dired-keys) 129 :group 'dired-keys)
152 130
153(defcustom dired-bind-jump t 131(defcustom dired-bind-jump t
154 "*t says bind `dired-jump' to C-x C-j, otherwise do not." 132 "*Non-nil means bind `dired-jump' to C-x C-j, otherwise do not."
155 :type 'boolean 133 :type 'boolean
156 :group 'dired-keys) 134 :group 'dired-keys)
157 135
158(defcustom dired-bind-man t 136(defcustom dired-bind-man t
159 "*t says bind `dired-man' to \"N\" in dired-mode, otherwise do not." 137 "*Non-nil means bind `dired-man' to \"N\" in dired-mode, otherwise do not."
160 :type 'boolean 138 :type 'boolean
161 :group 'dired-keys) 139 :group 'dired-keys)
162 140
163(defcustom dired-bind-info t 141(defcustom dired-bind-info t
164 "*t says bind `dired-info' to \"I\" in dired-mode, otherwise do not." 142 "*Non-nil means bind `dired-info' to \"I\" in dired-mode, otherwise do not."
165 :type 'boolean 143 :type 'boolean
166 :group 'dired-keys) 144 :group 'dired-keys)
167 145
168(defcustom dired-vm-read-only-folders nil 146(defcustom dired-vm-read-only-folders nil
169 "*If t, \\[dired-vm] will visit all folders read-only. 147 "*If non-nil, \\[dired-vm] will visit all folders read-only.
170If neither nil nor t, e.g. the symbol `if-file-read-only', only 148If neither nil nor t, e.g. the symbol `if-file-read-only', only
171files not writable by you are visited read-only. 149files not writable by you are visited read-only.
172 150
@@ -203,7 +181,7 @@ If there are several Dired buffers for a directory, the most recently
203used is chosen. 181used is chosen.
204 182
205Dired avoids switching to the current buffer, so that if you have 183Dired avoids switching to the current buffer, so that if you have
206a normal and a wildcard buffer for the same directory, C-x d RET will 184a normal and a wildcard buffer for the same directory, \\[dired] will
207toggle between those two." 185toggle between those two."
208 :type 'boolean 186 :type 'boolean
209 :group 'dired-x) 187 :group 'dired-x)
@@ -226,24 +204,27 @@ a directory. See also `dired-local-variables-file'."
226 :group 'dired-x) 204 :group 'dired-x)
227 205
228(defcustom dired-guess-shell-gnutar nil 206(defcustom dired-guess-shell-gnutar nil
229 "*If non-nil, name of GNU tar executable (e.g., \"tar\" or \"gtar\") and `z' 207 "*If non-nil, name of GNU tar executable.
230switch will be used for compressed or gzip'ed tar files. If no GNU tar, set 208\(E.g., \"tar\" or \"gtar\"). The `z' switch will be used with it for
209compressed or gzip'ed tar files. If you don't have GNU tar, set this
231to nil: a pipe using `zcat' or `gunzip -c' will be used." 210to nil: a pipe using `zcat' or `gunzip -c' will be used."
232 :type 'boolean 211 :type '(choice (const :tag "Not GNU tar" nil)
212 (string :tag "Command name"))
233 :group 'dired-x) 213 :group 'dired-x)
234 214
235(defcustom dired-guess-shell-gzip-quiet t 215(defcustom dired-guess-shell-gzip-quiet t
236 "*non-nil says pass -q to gzip overriding verbose GZIP environment." 216 "*Non-nil says pass -q to gzip overriding verbose GZIP environment."
237 :type 'boolean 217 :type 'boolean
238 :group 'dired-x) 218 :group 'dired-x)
239 219
240(defcustom dired-guess-shell-znew-switches nil 220(defcustom dired-guess-shell-znew-switches nil
241 "*If non-nil, then string of switches passed to `znew', example: \"-K\"" 221 "*If non-nil, then string of switches passed to `znew', example: \"-K\"."
242 :type 'boolean 222 :type '(choice (const :tag "None" nil)
223 (string :tag "Switches"))
243 :group 'dired-x) 224 :group 'dired-x)
244 225
245(defcustom dired-clean-up-buffers-too t 226(defcustom dired-clean-up-buffers-too t
246 "*t says offer to kill buffers visiting files and dirs deleted in dired." 227 "*Non-nil means offer to kill buffers visiting files and dirs deleted in dired."
247 :type 'boolean 228 :type 'boolean
248 :group 'dired-x) 229 :group 'dired-x)
249 230
@@ -281,49 +262,47 @@ to nil: a pipe using `zcat' or `gunzip -c' will be used."
281(add-hook 'dired-after-readin-hook 'dired-omit-expunge) 262(add-hook 'dired-after-readin-hook 'dired-omit-expunge)
282 263
283(defun dired-extra-startup () 264(defun dired-extra-startup ()
284 "Automatically put on dired-mode-hook to get extra dired features: 265 "Automatically put on `dired-mode-hook' to get extra dired features:
285\\<dired-mode-map> 266\\<dired-mode-map>
286
287 \\[dired-do-run-mail]\t-- run mail on folder (see `dired-bind-vm') 267 \\[dired-do-run-mail]\t-- run mail on folder (see `dired-bind-vm')
288 \\[dired-info]\t-- run info on file 268 \\[dired-info]\t-- run info on file
289 \\[dired-man]\t-- run man on file 269 \\[dired-man]\t-- run man on file
290 \\[dired-do-find-marked-files]\t-- visit all marked files simultaneously 270 \\[dired-do-find-marked-files]\t-- visit all marked files simultaneously
291 \\[dired-omit-toggle]\t-- toggle omitting of files 271 \\[dired-omit-toggle]\t-- toggle omitting of files
292 \\[dired-mark-sexp]\t-- mark by lisp expression 272 \\[dired-mark-sexp]\t-- mark by Lisp expression
293 \\[dired-copy-filename-as-kill]\t-- copy the file or subdir names into the kill ring. 273 \\[dired-copy-filename-as-kill]\t-- copy the file or subdir names into the kill ring.
294 \t You can feed it to other commands using \\[yank]. 274 \t You can feed it to other commands using \\[yank].
295 275
296For more features, see variables 276For more features, see variables
297 277
298 dired-bind-vm 278 `dired-bind-vm'
299 dired-bind-jump 279 `dired-bind-jump'
300 dired-bind-info 280 `dired-bind-info'
301 dired-bind-man 281 `dired-bind-man'
302 dired-vm-read-only-folders 282 `dired-vm-read-only-folders'
303 dired-omit-files-p 283 `dired-omit-files-p'
304 dired-omit-files 284 `dired-omit-files'
305 dired-omit-extensions 285 `dired-omit-extensions'
306 dired-omit-size-limit 286 `dired-omit-size-limit'
307 dired-find-subdir 287 `dired-find-subdir'
308 dired-enable-local-variables 288 `dired-enable-local-variables'
309 dired-local-variables-file 289 `dired-local-variables-file'
310 dired-guess-shell-gnutar 290 `dired-guess-shell-gnutar'
311 dired-guess-shell-gzip-quiet 291 `dired-guess-shell-gzip-quiet'
312 dired-guess-shell-znew-switches 292 `dired-guess-shell-znew-switches'
313 dired-guess-shell-alist-user 293 `dired-guess-shell-alist-user'
314 dired-clean-up-buffers-too 294 `dired-clean-up-buffers-too'
315 295
316See also functions 296See also functions
317 297
318 dired-flag-extension 298 `dired-flag-extension'
319 dired-virtual 299 `dired-virtual'
320 dired-jump 300 `dired-jump'
321 dired-man 301 `dired-man'
322 dired-vm 302 `dired-vm'
323 dired-rmail 303 `dired-rmail'
324 dired-info 304 `dired-info'
325 dired-do-find-marked-files 305 `dired-do-find-marked-files'"
326"
327 (interactive) 306 (interactive)
328 307
329 ;; These must be done in each new dired buffer. 308 ;; These must be done in each new dired buffer.
@@ -335,9 +314,8 @@ See also functions
335 314
336;; REDEFINE. 315;; REDEFINE.
337(defun dired-clean-up-after-deletion (fn) 316(defun dired-clean-up-after-deletion (fn)
338 317 "Clean up after a deleted file or directory FN.
339 ;; Clean up after a deleted file or directory FN. 318Remove expanded subdir of deleted dir, if any."
340 ;; Remove expanded subdir of deleted dir, if any.
341 (save-excursion (and (cdr dired-subdir-alist) 319 (save-excursion (and (cdr dired-subdir-alist)
342 (dired-goto-subdir fn) 320 (dired-goto-subdir fn)
343 (dired-kill-subdir))) 321 (dired-kill-subdir)))
@@ -369,7 +347,7 @@ See also functions
369 347
370;;; Mark files with some extension. 348;;; Mark files with some extension.
371(defun dired-mark-extension (extension &optional marker-char) 349(defun dired-mark-extension (extension &optional marker-char)
372 "Mark all files with a certain extension for use in later commands. 350 "Mark all files with a certain EXTENSION for use in later commands.
373A `.' is not automatically prepended to the string entered." 351A `.' is not automatically prepended to the string entered."
374 ;; EXTENSION may also be a list of extensions instead of a single one. 352 ;; EXTENSION may also be a list of extensions instead of a single one.
375 ;; Optional MARKER-CHAR is marker to use. 353 ;; Optional MARKER-CHAR is marker to use.
@@ -384,7 +362,7 @@ A `.' is not automatically prepended to the string entered."
384 marker-char)) 362 marker-char))
385 363
386(defun dired-flag-extension (extension) 364(defun dired-flag-extension (extension)
387 "In dired, flag all files with a certain extension for deletion. 365 "In dired, flag all files with a certain EXTENSION for deletion.
388A `.' is *not* automatically prepended to the string entered." 366A `.' is *not* automatically prepended to the string entered."
389 (interactive "sFlagging extension: ") 367 (interactive "sFlagging extension: ")
390 (dired-mark-extension extension dired-del-marker)) 368 (dired-mark-extension extension dired-del-marker))
@@ -519,7 +497,7 @@ You can then feed the file name(s) to other commands with \\[yank]."
519;; should probably get rid of this and always use 'no-dir. 497;; should probably get rid of this and always use 'no-dir.
520;; sk 28-Aug-1991 09:37 498;; sk 28-Aug-1991 09:37
521(defvar dired-omit-localp 'no-dir 499(defvar dired-omit-localp 'no-dir
522 "The LOCALP argument dired-omit-expunge passes to dired-get-filename. 500 "The LOCALP argument `dired-omit-expunge' passes to `dired-get-filename'.
523If it is 'no-dir, omitting is much faster, but you can only match 501If it is 'no-dir, omitting is much faster, but you can only match
524against the basename of the file. Set it to nil if you need to match the 502against the basename of the file. Set it to nil if you need to match the
525whole pathname.") 503whole pathname.")
@@ -558,10 +536,10 @@ With an arg, and if omitting was on, turn it off but don't refresh the buffer."
558 dired-latex-unclean-extensions 536 dired-latex-unclean-extensions
559 dired-bibtex-unclean-extensions 537 dired-bibtex-unclean-extensions
560 dired-texinfo-unclean-extensions) 538 dired-texinfo-unclean-extensions)
561 "If non-nil, a list of extensions \(strings\) to omit from Dired listings. 539 "If non-nil, a list of extensions \(strings\) to omit from Dired listings.
562Defaults to elements of `completion-ignored-extensions', 540Defaults to elements of `completion-ignored-extensions',
563`dired-latex-unclean-extensions', `dired-bibtex-unclean-extensions', and 541`dired-latex-unclean-extensions', `dired-bibtex-unclean-extensions', and
564`dired-texinfo-unclean-extensions'. 542`dired-texinfo-unclean-extensions'.
565 543
566See interactive function `dired-omit-toggle' \(\\[dired-omit-toggle]\) and 544See interactive function `dired-omit-toggle' \(\\[dired-omit-toggle]\) and
567variables `dired-omit-files-p' and `dired-omit-files'.") 545variables `dired-omit-files-p' and `dired-omit-files'.")
@@ -599,7 +577,7 @@ This functions works by temporarily binding `dired-marker-char' to
599 (message "(Nothing to omit)")))) 577 (message "(Nothing to omit)"))))
600 ;; Try to preserve modified state of buffer. So `%*' doesn't appear 578 ;; Try to preserve modified state of buffer. So `%*' doesn't appear
601 ;; in mode-line of omitted buffers. 579 ;; in mode-line of omitted buffers.
602 (set-buffer-modified-p (and old-modified-p 580 (set-buffer-modified-p (and old-modified-p
603 (save-excursion 581 (save-excursion
604 (goto-char (point-min)) 582 (goto-char (point-min))
605 (re-search-forward dired-re-mark nil t)))) 583 (re-search-forward dired-re-mark nil t))))
@@ -617,7 +595,7 @@ This functions works by temporarily binding `dired-marker-char' to
617 595
618;; Returns t if any work was done, nil otherwise. 596;; Returns t if any work was done, nil otherwise.
619(defun dired-mark-unmarked-files (regexp msg &optional unflag-p localp) 597(defun dired-mark-unmarked-files (regexp msg &optional unflag-p localp)
620 "Marks unmarked files matching REGEXP, displaying MSG. 598 "Mark unmarked files matching REGEXP, displaying MSG.
621REGEXP is matched against the complete pathname. 599REGEXP is matched against the complete pathname.
622Does not re-mark files which already have a mark. 600Does not re-mark files which already have a mark.
623With prefix argument, unflag all those files. 601With prefix argument, unflag all those files.
@@ -693,8 +671,7 @@ resume it in a later session.
693Type \\<dired-mode-map>\\[revert-buffer] in the 671Type \\<dired-mode-map>\\[revert-buffer] in the
694Virtual Dired buffer and answer `y' to convert the virtual to a real 672Virtual Dired buffer and answer `y' to convert the virtual to a real
695dired buffer again. You don't have to do this, though: you can relist 673dired buffer again. You don't have to do this, though: you can relist
696single subdirs using \\[dired-do-redisplay]. 674single subdirs using \\[dired-do-redisplay]."
697"
698 675
699 ;; DIRNAME is the top level directory of the buffer. It will become 676 ;; DIRNAME is the top level directory of the buffer. It will become
700 ;; its `default-directory'. If nil, the old value of 677 ;; its `default-directory'. If nil, the old value of
@@ -738,11 +715,10 @@ single subdirs using \\[dired-do-redisplay].
738 (dired-initial-position dirname)) 715 (dired-initial-position dirname))
739 716
740(defun dired-virtual-guess-dir () 717(defun dired-virtual-guess-dir ()
741 718 "Guess and return appropriate working directory of this buffer.
742 ;; Guess and return appropriate working directory of this buffer, 719Th ebuffer is assumed to be in Dired or ls -lR format. The guess is
743 ;; assumed to be in Dired or ls -lR format. 720based upon buffer contents. If nothing could be guessed, returns
744 ;; The guess is based upon buffer contents. 721nil."
745 ;; If nothing could be guessed, returns nil.
746 722
747 (let ((regexp "^\\( \\)?\\([^ \n\r]*\\)\\(:\\)[\n\r]") 723 (let ((regexp "^\\( \\)?\\([^ \n\r]*\\)\\(:\\)[\n\r]")
748 (subexpr 2)) 724 (subexpr 2))
@@ -769,7 +745,7 @@ single subdirs using \\[dired-do-redisplay].
769(defun dired-virtual-revert (&optional arg noconfirm) 745(defun dired-virtual-revert (&optional arg noconfirm)
770 (if (not 746 (if (not
771 (y-or-n-p "Cannot revert a Virtual Dired buffer - switch to Real Dired mode? ")) 747 (y-or-n-p "Cannot revert a Virtual Dired buffer - switch to Real Dired mode? "))
772 (error "Cannot revert a Virtual Dired buffer.") 748 (error "Cannot revert a Virtual Dired buffer")
773 (setq mode-name "Dired" 749 (setq mode-name "Dired"
774 revert-buffer-function 'dired-revert) 750 revert-buffer-function 'dired-revert)
775 (revert-buffer))) 751 (revert-buffer)))
@@ -811,13 +787,13 @@ Also useful for `auto-mode-alist' (which see) like this:
811 '((dired-mode . (if (fboundp 'dired-current-directory) 787 '((dired-mode . (if (fboundp 'dired-current-directory)
812 (dired-current-directory) 788 (dired-current-directory)
813 default-directory))) 789 default-directory)))
814 "Alist of major modes and their opinion on default-directory, as a 790 "Alist of major modes and their opinion on `default-directory'.
815lisp expression to evaluate. A resulting value of nil is ignored in 791This is given as a Lisp expression to evaluate. A resulting value of
816favor of default-directory.") 792nil is ignored in favor of `default-directory'.")
817 793
818(defun default-directory () 794(defun dired-default-directory ()
819 "Usage like variable `default-directory', but knows about the special 795 "Usage like variable `default-directory'.
820cases in variable `default-directory-alist' (which see)." 796Knows about the special cases in variable `default-directory-alist'."
821 (or (eval (cdr (assq major-mode default-directory-alist))) 797 (or (eval (cdr (assq major-mode default-directory-alist)))
822 default-directory)) 798 default-directory))
823 799
@@ -826,7 +802,7 @@ cases in variable `default-directory-alist' (which see)."
826 (interactive (list (read-from-minibuffer "Shell command: " 802 (interactive (list (read-from-minibuffer "Shell command: "
827 nil nil nil 'shell-command-history) 803 nil nil nil 'shell-command-history)
828 current-prefix-arg)) 804 current-prefix-arg))
829 (let ((default-directory (default-directory))) 805 (let ((default-directory (dired-default-directory)))
830 (shell-command cmd insert))) 806 (shell-command cmd insert)))
831 807
832 808
@@ -881,7 +857,7 @@ information on local variables. See also `dired-enable-local-variables'.")
881 (delete-region opoint (point-max))))) 857 (delete-region opoint (point-max)))))
882 858
883(defun dired-omit-here-always () 859(defun dired-omit-here-always ()
884 "Creates `dired-local-variables-file' for omitting and reverts directory. 860 "Create `dired-local-variables-file' for omitting and reverts directory.
885Sets dired-omit-file-p to t in a local variables file that is readable by 861Sets dired-omit-file-p to t in a local variables file that is readable by
886dired." 862dired."
887 (interactive) 863 (interactive)
@@ -994,7 +970,7 @@ dired."
994 '("\\.p[bgpn]m$" "xloadimage") 970 '("\\.p[bgpn]m$" "xloadimage")
995 '("\\.gif$" "xloadimage") ; view gif pictures 971 '("\\.gif$" "xloadimage") ; view gif pictures
996 '("\\.tif$" "xloadimage") 972 '("\\.tif$" "xloadimage")
997 '("\\.png$" "xloadimage") 973 '("\\.png$" "display") ; xloadimage 4.1 doesn't grok PNG
998 '("\\.jpg$" "xloadimage") 974 '("\\.jpg$" "xloadimage")
999 '("\\.fig$" "xfig") ; edit fig pictures 975 '("\\.fig$" "xfig") ; edit fig pictures
1000 '("\\.out$" "xgraph") ; for plotting purposes. 976 '("\\.out$" "xgraph") ; for plotting purposes.
@@ -1019,11 +995,11 @@ dired."
1019 ) 995 )
1020 996
1021 "Default alist used for shell command guessing. 997 "Default alist used for shell command guessing.
1022See `dired-guess-shell-alist-user'") 998See `dired-guess-shell-alist-user'.")
1023 999
1024(defvar dired-guess-shell-alist-user nil 1000(defcustom dired-guess-shell-alist-user nil
1025 "User-defined alist of rules for suggested commands. These rules take 1001 "User-defined alist of rules for suggested commands.
1026precedence over the predefined rules in the variable 1002These rules take precedence over the predefined rules in the variable
1027`dired-guess-shell-alist-default' (to which they are prepended). 1003`dired-guess-shell-alist-default' (to which they are prepended).
1028 1004
1029Each element of this list looks like 1005Each element of this list looks like
@@ -1039,18 +1015,18 @@ You can set this variable in your ~/.emacs. For example, to add rules for
1039`.foo' and `.bar' files, write 1015`.foo' and `.bar' files, write
1040 1016
1041 \(setq dired-guess-shell-alist-user 1017 \(setq dired-guess-shell-alist-user
1042 (list (list \"\\\\.foo$\" \"FOO-COMMAND\");; fixed rule 1018 (list (list \"\\\\.foo\\\\'\" \"FOO-COMMAND\");; fixed rule
1043 ;; possibly more rules ... 1019 ;; possibly more rules ...
1044 (list \"\\\\.bar$\";; rule with condition test 1020 (list \"\\\\.bar\\\'\";; rule with condition test
1045 '(if condition 1021 '(if condition
1046 \"BAR-COMMAND-1\" 1022 \"BAR-COMMAND-1\"
1047 \"BAR-COMMAND-2\")))\) 1023 \"BAR-COMMAND-2\")))\)"
1048") 1024 :group 'dired-x
1025 :type '(alist :key-type regexp :value-type (repeat sexp)))
1049 1026
1050(defun dired-guess-default (files) 1027(defun dired-guess-default (files)
1051 1028 "Guess a shell commands for FILES. Return command or list of commands.
1052 ;; Guess a shell commands for FILES. Return command or list of commands. 1029See `dired-guess-shell-alist-user'."
1053 ;; See `dired-guess-shell-alist-user'.
1054 1030
1055 (let* ((case-fold-search nil) ; case-sensitive matching 1031 (let* ((case-fold-search nil) ; case-sensitive matching
1056 ;; Prepend the user's alist to the default alist. 1032 ;; Prepend the user's alist to the default alist.
@@ -1086,8 +1062,7 @@ You can set this variable in your ~/.emacs. For example, to add rules for
1086 (mapcar (function eval) cmds))))) 1062 (mapcar (function eval) cmds)))))
1087 1063
1088(defun dired-guess-shell-command (prompt files) 1064(defun dired-guess-shell-command (prompt files)
1089 1065 "Ask user with PROMPT for a shell command, guessing a default from FILES."
1090 ;; Ask user with PROMPT for a shell command, guessing a default from FILES.
1091 1066
1092 (let ((default (dired-guess-default files)) 1067 (let ((default (dired-guess-default files))
1093 default-list old-history val (failed t)) 1068 default-list old-history val (failed t))
@@ -1142,10 +1117,10 @@ You can set this variable in your ~/.emacs. For example, to add rules for
1142;;; REDEFINE. 1117;;; REDEFINE.
1143;;; Redefine dired-aux.el's version: 1118;;; Redefine dired-aux.el's version:
1144(defun dired-read-shell-command (prompt arg files) 1119(defun dired-read-shell-command (prompt arg files)
1145;; "Read a dired shell command prompting with PROMPT (using read-string). 1120 "Read a dired shell command prompting with PROMPT (using read-string).
1146;;ARG is the prefix arg and may be used to indicate in the prompt which 1121ARG is the prefix arg and may be used to indicate in the prompt which
1147;; files are affected. 1122 files are affected.
1148;;This is an extra function so that you can redefine it, e.g., to use gmhist." 1123This is an extra function so that you can redefine it."
1149 (dired-mark-pop-up 1124 (dired-mark-pop-up
1150 nil 'shell files 1125 nil 'shell files
1151 'dired-guess-shell-command 1126 'dired-guess-shell-command
@@ -1159,16 +1134,14 @@ You can set this variable in your ~/.emacs. For example, to add rules for
1159 "See variable `dired-keep-marker-move'.") 1134 "See variable `dired-keep-marker-move'.")
1160 1135
1161(defun dired-make-relative-symlink (file1 file2 &optional ok-if-already-exists) 1136(defun dired-make-relative-symlink (file1 file2 &optional ok-if-already-exists)
1162 "Three arguments: FILE1 FILE2 &optional OK-IF-ALREADY-EXISTS 1137 "Make a symbolic link (pointing to FILE1) in FILE2.
1163Make a symbolic link (pointing to FILE1) in FILE2.
1164The link is relative (if possible), for example 1138The link is relative (if possible), for example
1165 1139
1166 \"/vol/tex/bin/foo\" \"/vol/local/bin/foo\" 1140 \"/vol/tex/bin/foo\" \"/vol/local/bin/foo\"
1167 1141
1168results in 1142results in
1169 1143
1170 \"../../tex/bin/foo\" \"/vol/local/bin/foo\" 1144 \"../../tex/bin/foo\" \"/vol/local/bin/foo\""
1171"
1172 (interactive "FRelSymLink: \nFRelSymLink %s: \np") 1145 (interactive "FRelSymLink: \nFRelSymLink %s: \np")
1173 (let (name1 name2 len1 len2 (index 0) sub) 1146 (let (name1 name2 len1 len2 (index 0) sub)
1174 (setq file1 (expand-file-name file1) 1147 (setq file1 (expand-file-name file1)
@@ -1213,8 +1186,8 @@ results in
1213 name2 ok-if-already-exists))) 1186 name2 ok-if-already-exists)))
1214 1187
1215(defun dired-do-relsymlink (&optional arg) 1188(defun dired-do-relsymlink (&optional arg)
1216 "Relative symlink all marked (or next ARG) files into a directory, 1189 "Relative symlink all marked (or next ARG) files into a directory.
1217or make a relative symbolic link to the current file. 1190Otherwise make a relative symbolic link to the current file.
1218This creates relative symbolic links like 1191This creates relative symbolic links like
1219 1192
1220 foo -> ../bar/foo 1193 foo -> ../bar/foo
@@ -1278,12 +1251,12 @@ To display just marked files, type \\[delete-other-windows] first."
1278 1251
1279(defun dired-simultaneous-find-file (file-list noselect) 1252(defun dired-simultaneous-find-file (file-list noselect)
1280 1253
1281 ;; Visit all files in FILE-LIST and display them simultaneously. The 1254 "Visit all files in FILE-LIST and display them simultaneously.
1282 ;; current window is split across all files in FILE-LIST, as evenly as 1255The current window is split across all files in FILE-LIST, as evenly as
1283 ;; possible. Remaining lines go to the bottom-most window. The number of 1256possible. Remaining lines go to the bottom-most window. The number of
1284 ;; files that can be displayed this way is restricted by the height of the 1257files that can be displayed this way is restricted by the height of the
1285 ;; current window and the variable `window-min-height'. With non-nil 1258current window and the variable `window-min-height'. With non-nil
1286 ;; NOSELECT the files are merely found but not selected. 1259NOSELECT the files are merely found but not selected."
1287 1260
1288 ;; We don't make this function interactive because it is usually too clumsy 1261 ;; We don't make this function interactive because it is usually too clumsy
1289 ;; to specify FILE-LIST interactively unless via dired. 1262 ;; to specify FILE-LIST interactively unless via dired.
@@ -1297,7 +1270,7 @@ To display just marked files, type \\[delete-other-windows] first."
1297 ;; We will have to select the buffer. Calculate and check window size. 1270 ;; We will have to select the buffer. Calculate and check window size.
1298 (setq size (/ (window-height) (length file-list))) 1271 (setq size (/ (window-height) (length file-list)))
1299 (or (<= window-min-height size) 1272 (or (<= window-min-height size)
1300 (error "Too many files to visit simultaneously. Try C-u prefix.")) 1273 (error "Too many files to visit simultaneously. Try C-u prefix"))
1301 (find-file (car file-list))) 1274 (find-file (car file-list)))
1302 1275
1303 ;; Decrement. 1276 ;; Decrement.
@@ -1440,6 +1413,9 @@ See also variable `dired-vm-read-only-folders'."
1440;;; REDEFINE. 1413;;; REDEFINE.
1441;;; Redefines dired.el's version of `dired-initial-position' 1414;;; Redefines dired.el's version of `dired-initial-position'
1442(defun dired-initial-position (dirname) 1415(defun dired-initial-position (dirname)
1416 "Where point should go in a new listing of DIRNAME.
1417Point assumed at beginning of new subdir line.
1418You may redefine this function as you wish, e.g. like in dired-x.el."
1443 (end-of-line) 1419 (end-of-line)
1444 (if dired-find-subdir (dired-goto-subdir dirname)) ; new 1420 (if dired-find-subdir (dired-goto-subdir dirname)) ; new
1445 (if dired-trivial-filenames (dired-goto-next-nontrivial-file))) 1421 (if dired-trivial-filenames (dired-goto-next-nontrivial-file)))
@@ -1509,8 +1485,10 @@ to mark all zero length files."
1509 (forward-char mode-len) 1485 (forward-char mode-len)
1510 (setq nlink (read (current-buffer))) 1486 (setq nlink (read (current-buffer)))
1511 ;; Karsten Wenger <kw@cis.uni-muenchen.de> fixed uid. 1487 ;; Karsten Wenger <kw@cis.uni-muenchen.de> fixed uid.
1512 (setq uid (buffer-substring (+ (point) 1) (progn (forward-word 1) (point)))) 1488 (setq uid (buffer-substring (+ (point) 1)
1513 (re-search-forward "\\(Jan\\|Feb\\|Mar\\|Apr\\|May\\|Jun\\|Jul\\|Aug\\|Sep\\|Oct\\|Nov\\|Dec\\)") 1489 (progn (forward-word 1) (point))))
1490 (re-search-forward "\\(Jan\\|Feb\\|Mar\\|Apr\\|May\\|Jun\\|\
1491Jul\\|Aug\\|Sep\\|Oct\\|Nov\\|Dec\\)")
1514 (goto-char (match-beginning 1)) 1492 (goto-char (match-beginning 1))
1515 (forward-char -1) 1493 (forward-char -1)
1516 (setq size (string-to-int (buffer-substring (save-excursion 1494 (setq size (string-to-int (buffer-substring (save-excursion
@@ -1521,17 +1499,20 @@ to mark all zero length files."
1521 (backward-word 1) 1499 (backward-word 1)
1522 ;; if no gid is displayed, gid will be set to uid 1500 ;; if no gid is displayed, gid will be set to uid
1523 ;; but user will then not reference it anyway in PREDICATE. 1501 ;; but user will then not reference it anyway in PREDICATE.
1524 (setq gid (buffer-substring (save-excursion (forward-word 1) (point)) 1502 (setq gid (buffer-substring (save-excursion
1503 (forward-word 1) (point))
1525 (point)) 1504 (point))
1526 time (buffer-substring (match-beginning 1) 1505 time (buffer-substring (match-beginning 1)
1527 (1- (dired-move-to-filename))) 1506 (1- (dired-move-to-filename)))
1528 name (buffer-substring (point) 1507 name (buffer-substring (point)
1529 (or (dired-move-to-end-of-filename t) 1508 (or
1530 (point))) 1509 (dired-move-to-end-of-filename t)
1510 (point)))
1531 sym (progn 1511 sym (progn
1532 (if (looking-at " -> ") 1512 (if (looking-at " -> ")
1533 (buffer-substring (progn (forward-char 4) (point)) 1513 (buffer-substring
1534 (progn (end-of-line) (point))) 1514 (progn (forward-char 4) (point))
1515 (progn (end-of-line) (point)))
1535 ""))) 1516 "")))
1536 t) 1517 t)
1537 nil) 1518 nil)
@@ -1542,7 +1523,7 @@ to mark all zero length files."
1542;;; FIND FILE AT POINT. 1523;;; FIND FILE AT POINT.
1543 1524
1544(defvar dired-x-hands-off-my-keys t 1525(defvar dired-x-hands-off-my-keys t
1545 "*t means don't bind `dired-x-find-file' over `find-file' on keyboard. 1526 "*Non-nil means don't bind `dired-x-find-file' over `find-file' on keyboard.
1546Similarly for `dired-x-find-file-other-window' over `find-file-other-window'. 1527Similarly for `dired-x-find-file-other-window' over `find-file-other-window'.
1547If you change this variable after dired-x.el is loaded then do 1528If you change this variable after dired-x.el is loaded then do
1548\\[dired-x-bind-find-file].") 1529\\[dired-x-bind-find-file].")
@@ -1607,11 +1588,11 @@ to test if that file exists. Use minibuffer after snatching filename."
1607;;; Internal functions. 1588;;; Internal functions.
1608(defun dired-filename-at-point () 1589(defun dired-filename-at-point ()
1609 1590
1610 ;; Get the filename closest to point, but do not change position. Has a 1591 "Get the filename closest to point, but do not change position.
1611 ;; preference for looking backward when not directly on a symbol. Not 1592Has a preference for looking backward when not directly on a symbol. Not
1612 ;; perfect - point must be in middle of or end of filename. 1593perfect - point must be in middle of or end of filename."
1613 1594
1614 (let ((filename-chars ".a-zA-Z0-9---_/:$+@") 1595 (let ((filename-chars ".a-zA-Z0-9---_/:$+@") ; fixme: allow non-ASCII
1615 (bol (save-excursion (beginning-of-line) (point))) 1596 (bol (save-excursion (beginning-of-line) (point)))
1616 (eol (save-excursion (end-of-line) (point))) 1597 (eol (save-excursion (end-of-line) (point)))
1617 start end filename prefix) 1598 start end filename prefix)
@@ -1645,8 +1626,8 @@ to test if that file exists. Use minibuffer after snatching filename."
1645 (expand-file-name (concat prefix (buffer-substring start (point))))))) 1626 (expand-file-name (concat prefix (buffer-substring start (point)))))))
1646 1627
1647(defun read-filename-at-point (prompt) 1628(defun read-filename-at-point (prompt)
1648 ;;; Returns filename prompting with PROMPT with completion. If 1629 "Return filename prompting with PROMPT with completion.
1649 ;;; `current-prefix-arg' is non-nil, uses name at point as guess. 1630If `current-prefix-arg' is non-nil, uses name at point as guess."
1650 (if current-prefix-arg 1631 (if current-prefix-arg
1651 (let ((guess (dired-filename-at-point))) 1632 (let ((guess (dired-filename-at-point)))
1652 (read-file-name prompt 1633 (read-file-name prompt
@@ -1654,29 +1635,17 @@ to test if that file exists. Use minibuffer after snatching filename."
1654 guess 1635 guess
1655 nil (file-name-nondirectory guess))) 1636 nil (file-name-nondirectory guess)))
1656 (read-file-name prompt default-directory))) 1637 (read-file-name prompt default-directory)))
1657
1658 1638
1659;;; BUG REPORTS 1639;;; BUG REPORTS
1660 1640
1641;; Fixme: get rid of this later.
1642
1661;;; This section is provided for reports. It uses Barry A. Warsaw's 1643;;; This section is provided for reports. It uses Barry A. Warsaw's
1662;;; reporter.el which is bundled with GNU Emacs v19. 1644;;; reporter.el which is bundled with GNU Emacs v19.
1663 1645
1664(defconst dired-x-version "2.37" 1646(defconst dired-x-help-address "bug-gnu-emacs@gnu.org"
1665 "Revision number of dired-x.el -- dired extra for GNU Emacs v19.
1666Type \\[dired-x-submit-report] to send a bug report. Available via anonymous
1667ftp in
1668
1669 /roebling.poly.edu:/pub/packages/dired-x.tar.gz")
1670
1671(defconst dired-x-help-address "dodd@roebling.poly.edu"
1672 "Address(es) accepting submission of reports on dired-x.el.") 1647 "Address(es) accepting submission of reports on dired-x.el.")
1673 1648
1674(defconst dired-x-maintainer "Larry"
1675 "First name(s) of people accepting submission of reports on dired-x.el.")
1676
1677(defconst dired-x-file "dired-x.el"
1678 "Name of file containing emacs lisp code.")
1679
1680(defconst dired-x-variable-list 1649(defconst dired-x-variable-list
1681 (list 1650 (list
1682 'dired-bind-vm 1651 'dired-bind-vm
@@ -1696,31 +1665,21 @@ ftp in
1696 'dired-omit-files 1665 'dired-omit-files
1697 'dired-omit-extensions 1666 'dired-omit-extensions
1698 ) 1667 )
1699 "List of variables to be appended to reports sent by `dired-x-submit-report.'") 1668 "List of variables to be appended to reports sent by `dired-x-submit-report'.")
1700 1669
1701(defun dired-x-submit-report () 1670(defun dired-x-submit-report ()
1702 "Submit via reporter.el a bug report on program. Send report on `dired-x-file' 1671 "Submit via reporter.el a bug report on program.
1703version `dired-x-version,' to `dired-x-maintainer' at address `dired-x-help-address' 1672Send report on `dired-x-file' version `dired-x-version,' to
1704listing variables `dired-x-variable-list' in the message." 1673`dired-x-maintainer' at address `dired-x-help-address' listing
1674variables `dired-x-variable-list' in the message."
1705 (interactive) 1675 (interactive)
1706 1676
1707 ;; In case we can't find reporter... 1677 (reporter-submit-bug-report
1708 (condition-case err 1678 dired-x-help-address ; address
1709 (progn 1679 "dired-x" ; pkgname
1710 ;; Get it if we can. 1680 dired-x-variable-list ; varlist
1711 (require 'reporter) 1681 nil nil ; pre-/post-hooks
1712 1682 ""))
1713 (reporter-submit-bug-report
1714 dired-x-help-address ; address
1715 (concat dired-x-file " (" dired-x-version ")") ; pkgname
1716 dired-x-variable-list ; varlist
1717 nil nil ; pre-/post-hooks
1718 (concat dired-x-maintainer ","))) ; salutation
1719
1720 ;; ...fail gracefully.
1721 (error
1722 (beep)
1723 (message "Sorry, reporter.el not found."))))
1724 1683
1725 1684
1726;; As Barry Warsaw would say: "This might be useful..." 1685;; As Barry Warsaw would say: "This might be useful..."