emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r114277: * lisp/dired-x.el (dired-guess-default): Ma


From: Glenn Morris
Subject: [Emacs-diffs] trunk r114277: * lisp/dired-x.el (dired-guess-default): Make `file' available in the env.
Date: Fri, 13 Sep 2013 17:28:36 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 114277
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/15363
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Fri 2013-09-13 13:28:34 -0400
message:
  * lisp/dired-x.el (dired-guess-default): Make `file' available in the env. 
  (dired-guess-shell-alist-user): Doc fix.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/dired-x.el                diredx.el-20091113204419-o5vbwnq5f7feedwu-649
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-09-13 16:46:18 +0000
+++ b/lisp/ChangeLog    2013-09-13 17:28:34 +0000
@@ -1,3 +1,8 @@
+2013-09-13  Glenn Morris  <address@hidden>
+
+       * dired-x.el (dired-guess-shell-alist-user): Doc fix.
+       (dired-guess-default): Make `file' available in the env.  (Bug#15363)
+
 2013-09-13  Dmitry Antipov  <address@hidden>
 
        * frame.el (x-focus-frame): Mark as declared in frame.c.

=== modified file 'lisp/dired-x.el'
--- a/lisp/dired-x.el   2013-09-10 01:28:01 +0000
+++ b/lisp/dired-x.el   2013-09-13 17:28:34 +0000
@@ -1047,7 +1047,8 @@
     (REGEXP COMMAND...)
 
 where each COMMAND can either be a string or a Lisp expression that evaluates
-to a string.  If several COMMANDs are given, the first one will be the default
+to a string.  This expression can access the file name as the variable `file'.
+If several COMMANDs are given, the first one will be the default
 and the rest will be added temporarily to the history and can be retrieved
 with \\[previous-history-element] (M-p) .
 
@@ -1105,8 +1106,8 @@
     ;; 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)
-       (delete-dups (mapcar #'eval cmds))
-      (eval (car cmds)))))             ; single command
+       (delete-dups (mapcar (lambda (cmd) (eval cmd `((file . ,file)))) cmds))
+      (eval (car cmds) `((file . ,file))))))           ; single command
 
 (defun dired-guess-shell-command (prompt files)
   "Ask user with PROMPT for a shell command, guessing a default from FILES."


reply via email to

[Prev in Thread] Current Thread [Next in Thread]