summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/dired-x.el7
-rw-r--r--test/lisp/dired-x-tests.el5
2 files changed, 7 insertions, 5 deletions
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index 2d91b5a9e8d..073923e09c9 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -979,9 +979,10 @@ See `dired-guess-shell-alist-user'."
#'append
(mapcar #'cdr
(seq-filter (lambda (elem)
- (seq-some (lambda (file)
- (string-match-p (car elem) file))
- files))
+ (seq-every-p
+ (lambda (file)
+ (string-match-p (car elem) file))
+ files))
(append dired-guess-shell-alist-user
dired-guess-shell-alist-default)))
nil))))
diff --git a/test/lisp/dired-x-tests.el b/test/lisp/dired-x-tests.el
index 98754b19b4e..003923d60fa 100644
--- a/test/lisp/dired-x-tests.el
+++ b/test/lisp/dired-x-tests.el
@@ -58,8 +58,9 @@
("\\.jpe?g\\'" "xloadimage"))))
(should (equal (dired-guess-default '("/tmp/foo.png")) "display"))
(should (equal (dired-guess-default '("/tmp/foo.gif"))
- '("display" "xloadimage" "feh")))))
-
+ '("display" "xloadimage" "feh")))
+ (should (equal (dired-guess-default '("/tmp/foo.png" "/tmp/foo.txt"))
+ nil))))
(provide 'dired-x-tests)
;; dired-x-tests.el ends here