]> code.delx.au - gnu-emacs/blobdiff - lisp/arc-mode.el
Merge changes made in Gnus trunk.
[gnu-emacs] / lisp / arc-mode.el
index fb6155dfd41e3feaa4b4df3fad7061d2bdbd62f5..131b0dcd9581fd0337ab5176ebe187f8154ed727 100644 (file)
@@ -1,7 +1,6 @@
 ;;; arc-mode.el --- simple editing of archives
 
-;; Copyright (C) 1995, 1997, 1998, 2001, 2002, 2003, 2004, 2005, 2006,
-;;   2007, 2008, 2009, 2010  Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1997-1998, 2001-2011  Free Software Foundation, Inc.
 
 ;; Author: Morten Welinder <terra@gnu.org>
 ;; Keywords: files archives msdog editing major-mode
@@ -616,7 +615,7 @@ the mode is invalid.  If ERROR is nil then nil will be returned."
 (defun archive-get-lineno ()
   (if (>= (point) archive-file-list-start)
       (count-lines archive-file-list-start
-                  (save-excursion (beginning-of-line) (point)))
+                  (line-beginning-position))
     0))
 
 (defun archive-get-descr (&optional noerror)
@@ -1811,10 +1810,15 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
    (t
     (archive-extract-by-stdout
      archive
-     ;; unzip expands wildcards in NAME, so we need to quote it.
+     ;; unzip expands wildcards in NAME, so we need to quote it.  But
+     ;; not on DOS/Windows, since that fails extraction on those
+     ;; systems (unless w32-quote-process-args is nil), and file names
+     ;; with wildcards in zip archives don't work there anyway.
      ;; FIXME: Does pkunzip need similar treatment?
-     ;; (7z doesn't need to quote wildcards)
-     (if (equal (car archive-zip-extract) "unzip")
+     (if (and (or (not (memq system-type '(windows-nt ms-dos)))
+                 (and (boundp 'w32-quote-process-args)
+                      (null w32-quote-process-args)))
+             (equal (car archive-zip-extract) "unzip"))
         (shell-quote-argument name)
        name)
      archive-zip-extract))))
@@ -2210,5 +2214,4 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
 
 (provide 'arc-mode)
 
-;; arch-tag: e5966a01-35ec-4f27-8095-a043a79b457b
 ;;; arc-mode.el ends here