]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/net/ange-ftp.el: Allow loading .gz files (Bug#6923).
authorKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 27 Jun 2011 21:30:37 +0000 (17:30 -0400)
committerChong Yidong <cyd@stupidchicken.com>
Mon, 27 Jun 2011 21:30:37 +0000 (17:30 -0400)
(ange-ftp-make-tmp-name): New arg.
(ange-ftp-file-local-copy): Use it.

lisp/ChangeLog
lisp/net/ange-ftp.el

index 9da037d06b0e8bf0f7f750b938c887098e91c049..170939cfc4b7a994f35d1f74be5064fe5cc10745 100644 (file)
@@ -1,3 +1,9 @@
+2011-06-27  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * net/ange-ftp.el: Allow loading .gz files (Bug#6923).
+       (ange-ftp-make-tmp-name): New arg.
+       (ange-ftp-file-local-copy): Use it.
+
 2011-06-27  Jambunathan K  <kjambunathan@gmail.com>
 
        * tar-mode.el (tar-untar-buffer): Set coding-system-for-write to
index 1282f86d5032a20229f15a17ebcbcd71f36be644..41716dbdacd3cb89681323fcd713afddbea4f669 100644 (file)
@@ -1723,11 +1723,12 @@ good, skip, fatal, or unknown."
 ;;; Temporary file location and deletion...
 ;;; ------------------------------------------------------------
 
-(defun ange-ftp-make-tmp-name (host)
+(defun ange-ftp-make-tmp-name (host &optional suffix)
   "This routine will return the name of a new file."
   (make-temp-file (if (ange-ftp-use-gateway-p host)
                      ange-ftp-gateway-tmp-name-template
-                   ange-ftp-tmp-name-template)))
+                   ange-ftp-tmp-name-template)
+                 nil suffix))
 
 (defun ange-ftp-del-tmp-name (filename)
   "Force to delete temporary file."
@@ -4139,7 +4140,8 @@ directory, so that Emacs will know its current contents."
   (let* ((fn1 (expand-file-name file))
         (pa1 (ange-ftp-ftp-name fn1)))
     (if pa1
-       (let ((tmp1 (ange-ftp-make-tmp-name (car pa1))))
+       (let ((tmp1 (ange-ftp-make-tmp-name (car pa1)
+                                           (file-name-extension file t))))
          (ange-ftp-copy-file-internal fn1 tmp1 t nil
                                       (format "Getting %s" fn1))
          tmp1))))