changeset 22834:926aae368e61

(archive-set-buffer-as-visiting-file): Give FILENAME arg to set-auto-coding-funciton. (archive-extract): Pay attention to enable-multibyte-characters. (archive-*-write-file-member): Likewise. (archive-rename-entry): Likewise.
author Kenichi Handa <handa@m17n.org>
date Mon, 27 Jul 1998 00:37:00 +0000
parents a3fe2af7cefb
children 1cda5e4bddba
files lisp/arc-mode.el
diffstat 1 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/arc-mode.el	Sun Jul 26 23:03:58 1998 +0000
+++ b/lisp/arc-mode.el	Mon Jul 27 00:37:00 1998 +0000
@@ -841,7 +841,7 @@
 	   (or coding-system-for-read
 	       (and set-auto-coding-function
 		    (funcall set-auto-coding-function
-			     (- (point-max) (point-min))))
+			     filename (- (point-max) (point-min))))
 	       ;; dos-w32.el defines find-operation-coding-system for
 	       ;; DOS/Windows systems which preserves the coding-system
 	       ;; of existing files.  We want it to act here as if the
@@ -914,7 +914,9 @@
 	       (null
 		(let (;; We may have to encode file name arguement for
 		      ;; external programs.
-		      (coding-system-for-write file-name-coding-system)
+		      (coding-system-for-write
+		       (and enable-multibyte-characters
+			    file-name-coding-system))
 		      ;; We read an archive member by no-conversion at
 		      ;; first, then decode appropriately by calling
 		      ;; archive-set-buffer-as-visiting-file later.
@@ -1098,7 +1100,9 @@
 	  (if (aref descr 3)
 	      ;; Set the file modes, but make sure we can read it.
 	      (set-file-modes tmpfile (logior ?\400 (aref descr 3))))
-	  (setq ename (encode-coding-string ename file-name-coding-system))
+	  (if enable-multibyte-characters
+	      (setq ename
+		    (encode-coding-string ename file-name-coding-system)))
           (let ((exitcode (apply 'call-process
                                  (car command)
                                  nil
@@ -1277,7 +1281,9 @@
     (if (fboundp func)
         (progn
 	  (funcall func (buffer-file-name)
-		   (encode-coding-string newname file-name-coding-system)
+		   (if enable-multibyte-characters
+		       (encode-coding-string newname file-name-coding-system)
+		     newname)
 		   descr)
 	  (archive-resummarize))
       (error "Renaming is not supported for this archive type"))))