summaryrefslogtreecommitdiff
path: root/lisp/dired-x.el
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen <larsi@gnus.org>2011-07-11 15:34:35 +0200
committerLars Magne Ingebrigtsen <larsi@gnus.org>2011-07-11 15:34:35 +0200
commitc3de9febac40b2ecd7c3a4e0c13f17f807d228fe (patch)
treed737f56daf77ad3b2d4680d8fc3981c4f30e6998 /lisp/dired-x.el
parentdcc88d8a924038fde2d6e883e5777cf57ee2f0c5 (diff)
downloademacs-c3de9febac40b2ecd7c3a4e0c13f17f807d228fe.tar.gz
(dired-guess-default): Remove duplicate shell command entries.
Fixes: debbugs:2028
Diffstat (limited to 'lisp/dired-x.el')
-rw-r--r--lisp/dired-x.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index 8395a8b905f..580217d3fbd 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -1103,9 +1103,10 @@ See `dired-guess-shell-alist-user'."
;; Return commands or nil if flist is still non-nil.
;; Evaluate the commands in order that any logical testing will be done.
- (if (cdr cmds)
- (mapcar #'eval cmds)
- (eval (car cmds))))) ; single command
+ (remove-duplicates
+ (if (cdr cmds)
+ (mapcar #'eval cmds)
+ (eval (car cmds)))))) ; single command
(defun dired-guess-shell-command (prompt files)
"Ask user with PROMPT for a shell command, guessing a default from FILES."