(defvar dired-file-version-alist)
+;;;###autoload
(defvar dired-directory nil
"The directory name or wildcard spec that this Dired directory lists.
Local to each dired buffer. May be a list, in which case the car is the
(save-excursion
(set-buffer (cdr (car blist)))
(if (and (eq major-mode mode)
+ dired-directory ;; nil during find-alternate-file
(equal dirname
(expand-file-name
(if (consp dired-directory)
(or (dired-string-replace-match
"\\([^\\]\\|\\`\\)\"" file "\\1\\\\\"" nil t)
file)
- "\"")))))
+ "\"")))
+ ;; The above `read' will return a unibyte string if FILE
+ ;; contains eight-bit-control/graphic characters.
+ (if (and enable-multibyte-characters
+ (not (multibyte-string-p file)))
+ (setq file (string-to-multibyte file)))))
(and file (file-name-absolute-p file)
;; A relative file name can start with ~.
;; Don't treat it as absolute in this context.
(not (eq (aref file 0) ?~))
(setq already-absolute t))
- (and file buffer-file-coding-system
- (not file-name-coding-system)
- (not default-file-name-coding-system)
- (setq file (encode-coding-string file buffer-file-coding-system)))
(cond
((null file)
nil)
;; The "[0-9]" below requires the previous column to end in a digit.
;; This avoids recognizing `1 may 1997' as a date in the line:
;; -r--r--r-- 1 may 1997 1168 Oct 19 16:49 README
- ;; The "[kMGTPEZY]?" below supports "ls -alh" output.
+ ;; The "[kKMGTPEZY]?" below supports "ls -alh" output.
;; The ".*" below finds the last match if there are multiple matches.
;; This avoids recognizing `jservice 10 1024' as a date in the line:
;; drwxr-xr-x 3 jservice 10 1024 Jul 2 1997 esg-host
- (concat ".*[0-9][kMGTPEZY]?" s
+ (concat ".*[0-9][kKMGTPEZY]?" s
"\\(" western "\\|" western-comma "\\|" japanese "\\|" iso "\\)"
s "+"))
"Regular expression to match up to the file name in a directory listing.