]> code.delx.au - gnu-emacs/blobdiff - lisp/pcmpl-gnu.el
nnimap `never' expiration fix
[gnu-emacs] / lisp / pcmpl-gnu.el
index da72c81c44a50cc18912a20cd8b6f4c5520d7b12..ada2a0417661d1f17dab9a0239125e81dca93faa 100644 (file)
@@ -1,6 +1,6 @@
 ;;; pcmpl-gnu.el --- completions for GNU project tools -*- lexical-binding: t -*-
 
-;; Copyright (C) 1999-2012 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2015 Free Software Foundation, Inc.
 
 ;; Package: pcomplete
 
       (pcomplete-uniqify-list rules))))
 
 (defcustom pcmpl-gnu-tarfile-regexp
-  "\\.t\\(ar\\(\\.\\(gz\\|bz2\\|Z\\)\\)?\\|gz\\|a[zZ]\\|z2\\)\\'"
+  "\\.t\\(ar\\(\\.\\(gz\\|bz2\\|Z\\|xz\\)\\)?\\|gz\\|a[zZ]\\|z2\\)\\'"
   "A regexp which matches any tar archive."
+  :version "24.3"                       ; added xz
   :type 'regexp
   :group 'pcmpl-gnu)
 
   "Completion for the GNU tar utility."
   ;; options that end in an equal sign will want further completion...
   (let (saw-option complete-within)
-    (let ((pcomplete-suffix-list (cons ?= pcomplete-suffix-list)))
+    (let ((pcomplete-suffix-list (if (boundp 'pcomplete-suffix-list)
+                                     (cons ?= pcomplete-suffix-list))))
       (while (pcomplete-match "^-" 0)
         (setq saw-option t)
         (if (pcomplete-match "^--" 0)
                 (let ((file (pcomplete-arg 1)))
                   (completion-table-dynamic
                    (lambda (_string)
-                     (pcmpl-gnu-with-file-buffer file
-                       (mapcar #'tar-header-name tar-parse-info)))))
+                     (pcmpl-gnu-with-file-buffer
+                      file (mapcar #'tar-header-name tar-parse-info)))))
              (pcomplete-entries))
            nil 'identity))))