changeset 21046:390b026f483d

(insert-directory): Bind coding-system-for-write. Don't encode filename here because call-process encodes the arguments by codign-system-for-write.
author Kenichi Handa <handa@m17n.org>
date Tue, 03 Mar 1998 07:17:56 +0000
parents cc3f3c1ea725
children 55c278cd38f0
files lisp/files.el
diffstat 1 files changed, 6 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Tue Mar 03 02:02:53 1998 +0000
+++ b/lisp/files.el	Tue Mar 03 07:17:56 1998 +0000
@@ -2988,6 +2988,8 @@
 		(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 @@
 						     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 @@
 				    ;; 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.