]> code.delx.au - gnu-emacs/blobdiff - lisp/dired.el
(shadow-parse-fullname): Renamed from shadow-parse-fullpath.
[gnu-emacs] / lisp / dired.el
index 6261e6bb392231181ddb5978927fdc39c1520508..db067c5da164b80059695c0019f9d0f4c6479f57 100644 (file)
@@ -219,6 +219,7 @@ This is what the `do' commands look for and what the `mark' commands store.")
 
 (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
@@ -1461,16 +1462,17 @@ Optional arg NO-ERROR-IF-NOT-FILEP means return nil if no filename on
                         (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)