summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorDrew Adams <drew.adams@oracle.com>2016-02-23 21:12:55 +1100
committerLars Ingebrigtsen <larsi@gnus.org>2016-02-23 21:13:35 +1100
commitdfe16506a98681b390b119a137776f10ed637126 (patch)
tree776e2c79072f5da881a9c68d3e46e8a075a7d97b /lisp
parent42bc065a6a05995ec365a5df09100989c03b822c (diff)
downloademacs-dfe16506a98681b390b119a137776f10ed637126.tar.gz
(ls-lisp-insert-directory): Make -B work
* lisp/ls-lisp.el (ls-lisp-insert-directory): Make -B work (bug#20776). Backport: (cherry picked from commit ef52e66efd78aac4c4e5bd5e11870e5ba3b37a1e)
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ls-lisp.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el
index 6b5304caada..85e91cdadc0 100644
--- a/lisp/ls-lisp.el
+++ b/lisp/ls-lisp.el
@@ -348,7 +348,9 @@ SWITCHES is a *list* of characters. TIME-INDEX is the time index into
file-attributes according to SWITCHES. WILDCARD-REGEXP is nil or an *Emacs
regexp*. FULL-DIRECTORY-P means file is a directory and SWITCHES does
not contain `d', so that a full listing is expected."
- (if (or wildcard-regexp full-directory-p)
+ (if (or (and wildcard-regexp
+ (not (string= "[^~]\\'" wildcard-regexp))) ; Switch -B pseudo-wildcard regexp
+ full-directory-p)
(let* ((dir (file-name-as-directory file))
(default-directory dir) ; so that file-attributes works
(file-alist