aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2013-09-13 13:28:34 -0400
committerGlenn Morris2013-09-13 13:28:34 -0400
commitd3fc65499a4bf85799eee7996128cd74fea17cce (patch)
treee2cb29149709a4feb2319da46f0e55b91a66bc4e
parente16582b6bc23a1a514d27cfc38c7ddcd91622adb (diff)
downloademacs-d3fc65499a4bf85799eee7996128cd74fea17cce.tar.gz
emacs-d3fc65499a4bf85799eee7996128cd74fea17cce.zip
* lisp/dired-x.el (dired-guess-default): Make `file' available in the env.
(dired-guess-shell-alist-user): Doc fix. Fixes: debbugs:15363
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/dired-x.el7
2 files changed, 9 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index aa17b9328c4..ba3de9f4305 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12013-09-13 Glenn Morris <rgm@gnu.org>
2
3 * dired-x.el (dired-guess-shell-alist-user): Doc fix.
4 (dired-guess-default): Make `file' available in the env. (Bug#15363)
5
12013-09-13 Dmitry Antipov <dmantipov@yandex.ru> 62013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
2 7
3 * frame.el (x-focus-frame): Mark as declared in frame.c. 8 * frame.el (x-focus-frame): Mark as declared in frame.c.
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index c15f3b5b121..287934f7adc 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -1047,7 +1047,8 @@ Each element of this list looks like
1047 (REGEXP COMMAND...) 1047 (REGEXP COMMAND...)
1048 1048
1049where each COMMAND can either be a string or a Lisp expression that evaluates 1049where each COMMAND can either be a string or a Lisp expression that evaluates
1050to a string. If several COMMANDs are given, the first one will be the default 1050to a string. This expression can access the file name as the variable `file'.
1051If several COMMANDs are given, the first one will be the default
1051and the rest will be added temporarily to the history and can be retrieved 1052and the rest will be added temporarily to the history and can be retrieved
1052with \\[previous-history-element] (M-p) . 1053with \\[previous-history-element] (M-p) .
1053 1054
@@ -1105,8 +1106,8 @@ See `dired-guess-shell-alist-user'."
1105 ;; Return commands or nil if flist is still non-nil. 1106 ;; Return commands or nil if flist is still non-nil.
1106 ;; Evaluate the commands in order that any logical testing will be done. 1107 ;; Evaluate the commands in order that any logical testing will be done.
1107 (if (cdr cmds) 1108 (if (cdr cmds)
1108 (delete-dups (mapcar #'eval cmds)) 1109 (delete-dups (mapcar (lambda (cmd) (eval cmd `((file . ,file)))) cmds))
1109 (eval (car cmds))))) ; single command 1110 (eval (car cmds) `((file . ,file)))))) ; single command
1110 1111
1111(defun dired-guess-shell-command (prompt files) 1112(defun dired-guess-shell-command (prompt files)
1112 "Ask user with PROMPT for a shell command, guessing a default from FILES." 1113 "Ask user with PROMPT for a shell command, guessing a default from FILES."