From: Kenichi Handa Date: Tue, 3 Mar 1998 07:17:56 +0000 (+0000) Subject: (insert-directory): Bind coding-system-for-write. X-Git-Tag: emacs-20.3~2028 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a91733595d6361493edd379f4e3b14b3413f1042;p=emacs.git (insert-directory): Bind coding-system-for-write. Don't encode filename here because call-process encodes the arguments by codign-system-for-write. --- diff --git a/lisp/files.el b/lisp/files.el index c25799990d7..c28455a8d66 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2988,6 +2988,8 @@ If WILDCARD, it also runs the shell specified by `shell-file-name'." (and enable-multibyte-characters (or file-name-coding-system default-file-name-coding-system))) + ;; This binding is for encoding arguements by call-process. + (coding-system-for-write coding-system-for-read) (result (if wildcard ;; Run ls in the directory of the file pattern we asked for. @@ -3016,9 +3018,7 @@ If WILDCARD, it also runs the shell specified by `shell-file-name'." switches (mapconcat 'identity switches " ")) " -- " - (encode-coding-string - pattern - file-name-coding-system t)))) + pattern))) ;; SunOS 4.1.3, SVr4 and others need the "." to list the ;; directory if FILE is a symbolic link. (apply 'call-process @@ -3039,11 +3039,9 @@ If WILDCARD, it also runs the shell specified by `shell-file-name'." ;; Avoid lossage if FILE starts with `-'. '("--") (list - (encode-coding-string - (if full-directory-p - (concat (file-name-as-directory file) ".") - file) - file-name-coding-system t)))))))) + (if full-directory-p + (concat (file-name-as-directory file) ".") + file)))))))) (if (/= result 0) ;; We get here if ls failed. ;; Access the file to get a suitable error.