* lisp/dired-x.el (dired-guess-default): Restore previous logic --
require matches for all files (bug#48071).
#'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))))
("\\.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