1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-26 07:33:47 +00:00

(dired-guess-default): Remove duplicate shell command entries.

Fixes: debbugs:2028
This commit is contained in:
Lars Magne Ingebrigtsen 2011-07-11 15:34:35 +02:00
parent dcc88d8a92
commit c3de9febac
2 changed files with 7 additions and 3 deletions

View File

@ -1,5 +1,8 @@
2011-07-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
* dired-x.el (dired-guess-default): Remove duplicate shell command
entries (bug#2028).
* subr.el (remove-duplicates): New conveniency function.
2011-07-10 Lars Magne Ingebrigtsen <larsi@gnus.org>

View File

@ -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.
(remove-duplicates
(if (cdr cmds)
(mapcar #'eval cmds)
(eval (car cmds))))) ; single command
(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."