comparison lisp/efs/dired.el @ 40:7e54bd776075 r19-15b103

Import from CVS: tag r19-15b103
author cvs
date Mon, 13 Aug 2007 08:54:25 +0200
parents 4103f0995bd7
children 8b8b7f3559a2
comparison
equal deleted inserted replaced
39:06f275776fba 40:7e54bd776075
90 ((and (= ver 19) (if lucid-p (< subver 10) (< subver 23))) 90 ((and (= ver 19) (if lucid-p (< subver 10) (< subver 23)))
91 (require 'fn-handler)) 91 (require 'fn-handler))
92 ((< ver 18) 92 ((< ver 18)
93 (error "dired does not work with emacs version %s" emacs-version)))) 93 (error "dired does not work with emacs version %s" emacs-version))))
94 94
95 ;; Load default-dir last, because we want its interactive specs. 95 ;; We duplicate default-dir stuff to avoid its overwrites unless
96 (require 'default-dir) 96 ;; they are explicitly requested.
97 97
98 (defvar default-directory-function nil
99 "A function to call to compute the default-directory for the current buffer.
100 If this is nil, the function default-directory will return the value of the
101 variable default-directory.
102 Buffer local.")
103 (make-variable-buffer-local 'default-directory-function)
104
105 (defun default-directory ()
106 " Returns the default-directory for the current buffer.
107 Will use the variable default-directory-function if it non-nil."
108 (if default-directory-function
109 (funcall default-directory-function)
110 (if (string-match "Lucid" emacs-version)
111 (abbreviate-file-name default-directory t)
112 (abbreviate-file-name default-directory))))
98 113
99 ;;;;---------------------------------------------------------------- 114 ;;;;----------------------------------------------------------------
100 ;;;; Customizable variables 115 ;;;; Customizable variables
101 ;;;;---------------------------------------------------------------- 116 ;;;;----------------------------------------------------------------
102 ;; 117 ;;
141 `force-flag' is the switch to pass to the command to force overwriting 156 `force-flag' is the switch to pass to the command to force overwriting
142 of existing files. 157 of existing files.
143 158
144 For example: 159 For example:
145 160
146 \(setq dired-compresssion-method-alist 161 \(setq dired-compression-method-alist
147 \(cons '\(frobnicate \".frob\" \(\"frob\"\) \(\"frob\" \"-d\"\) \"-f\"\) 162 \(cons '\(frobnicate \".frob\" \(\"frob\"\) \(\"frob\" \"-d\"\) \"-f\"\)
148 dired-compression-method-alist\)\) 163 dired-compression-method-alist\)\)
149 => \(\(frobnicate \".frob\" \(\"frob\"\) \(\"frob\" \"-d\"\)\) 164 => \(\(frobnicate \".frob\" \(\"frob\"\) \(\"frob\" \"-d\"\)\)
150 \(gzip \".gz\" \(\"gzip\"\) \(\"gunzip\"\)\) 165 \(gzip \".gz\" \(\"gzip\"\) \(\"gunzip\"\)\)
151 ...\) 166 ...\)
205 ;; an exception as it is not always in the PATH. 220 ;; an exception as it is not always in the PATH.
206 221
207 ;;;###autoload 222 ;;;###autoload
208 (defvar dired-chown-program 223 (defvar dired-chown-program
209 (if (memq system-type '(hpux dgux usg-unix-v)) "chown" "/etc/chown") 224 (if (memq system-type '(hpux dgux usg-unix-v)) "chown" "/etc/chown")
210 "*Name of chown command (usully `chown' or `/etc/chown').") 225 "*Name of chown command (usually `chown' or `/etc/chown').")
211 226
212 ;;;###autoload 227 ;;;###autoload
213 (defvar dired-gnutar-program nil 228 (defvar dired-gnutar-program nil
214 "*If non-nil, name of the GNU tar executable (e.g. \"tar\" or \"gnutar\"). 229 "*If non-nil, name of the GNU tar executable (e.g. \"tar\" or \"gnutar\").
215 GNU tar's `z' switch is used for compressed tar files. 230 GNU tar's `z' switch is used for compressed tar files.
3774 (defun dired-mark-file (arg &optional char) 3789 (defun dired-mark-file (arg &optional char)
3775 "Mark ARG files starting from the current file line. 3790 "Mark ARG files starting from the current file line.
3776 Optional CHAR indicates a marker character to use." 3791 Optional CHAR indicates a marker character to use."
3777 (let (buffer-read-only) 3792 (let (buffer-read-only)
3778 (if (memq (or char dired-marker-char) '(?\ ?\n ?\r)) 3793 (if (memq (or char dired-marker-char) '(?\ ?\n ?\r))
3779 (error "Invalid marker charcter %c" dired-marker-char)) 3794 (error "Invalid marker character %c" dired-marker-char))
3780 (or char (setq char dired-marker-char)) 3795 (or char (setq char dired-marker-char))
3781 (dired-repeat-over-lines 3796 (dired-repeat-over-lines
3782 arg 3797 arg
3783 (function 3798 (function
3784 (lambda () 3799 (lambda ()