diff options
Diffstat (limited to 'lisp/pcmpl-gnu.el')
-rw-r--r-- | lisp/pcmpl-gnu.el | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lisp/pcmpl-gnu.el b/lisp/pcmpl-gnu.el index 098aa3d5fe1..fa84b31675e 100644 --- a/lisp/pcmpl-gnu.el +++ b/lisp/pcmpl-gnu.el @@ -67,12 +67,13 @@ nil (function (lambda (entry) - (when (and (file-readable-p entry) - (file-regular-p entry)) - (let ((zipped (string-match "\\.\\(t?gz\\|\\(ta\\)?Z\\)\\'" - entry))) - (or (and unzip-p zipped) - (and (not unzip-p) (not zipped))))))))) + (or (file-directory-p entry) + (when (and (file-readable-p entry) + (file-regular-p entry)) + (let ((zipped (string-match "\\.\\(t?gz\\|\\(ta\\)?Z\\)\\'" + entry))) + (or (and unzip-p zipped) + (and (not unzip-p) (not zipped)))))))))) ;;;###autoload (defun pcomplete/bzip2 () @@ -118,7 +119,7 @@ Return the new list." (goto-char (point-min)) (while (re-search-forward - "^\\s-*\\([^\n#%.$][^:=\n]*\\)\\s-*:[^=]" nil t) + "^\\([^\t\n#%.$][^:=\n]*\\)\\s-*:[^=]" nil t) (setq targets (nconc (split-string (match-string-no-properties 1)) targets))) targets) |