Now on revision 114288. ------------------------------------------------------------ revno: 114288 committer: Dmitry Antipov branch nick: trunk timestamp: Sun 2013-09-15 10:50:41 +0400 message: * xterm.h (FRAME_X_SCREEN_NUMBER): Add comment. (BLACK_PIX_DEFAULT, WHITE_PIX_DEFAULT): Use FRAME_X_SCREEN_NUMBER. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-09-14 09:26:42 +0000 +++ src/ChangeLog 2013-09-15 06:50:41 +0000 @@ -1,3 +1,8 @@ +2013-09-15 Dmitry Antipov + + * xterm.h (FRAME_X_SCREEN_NUMBER): Add comment. + (BLACK_PIX_DEFAULT, WHITE_PIX_DEFAULT): Use FRAME_X_SCREEN_NUMBER. + 2013-09-14 Eli Zaretskii * buffer.c (syms_of_buffer) : === modified file 'src/xterm.h' --- src/xterm.h 2013-09-13 15:03:51 +0000 +++ src/xterm.h 2013-09-15 06:50:41 +0000 @@ -78,10 +78,11 @@ #include "dispextern.h" #include "termhooks.h" -#define BLACK_PIX_DEFAULT(f) BlackPixel (FRAME_X_DISPLAY (f), \ - XScreenNumberOfScreen (FRAME_X_SCREEN (f))) -#define WHITE_PIX_DEFAULT(f) WhitePixel (FRAME_X_DISPLAY (f), \ - XScreenNumberOfScreen (FRAME_X_SCREEN (f))) +/* Black and white pixel values for the screen which frame F is on. */ +#define BLACK_PIX_DEFAULT(f) \ + BlackPixel (FRAME_X_DISPLAY (f), FRAME_X_SCREEN_NUMBER (f)) +#define WHITE_PIX_DEFAULT(f) \ + WhitePixel (FRAME_X_DISPLAY (f), FRAME_X_SCREEN_NUMBER (f)) #define FONT_WIDTH(f) ((f)->max_width) #define FONT_HEIGHT(f) ((f)->ascent + (f)->descent) @@ -707,6 +708,8 @@ /* This is the `Screen *' which frame F is on. */ #define FRAME_X_SCREEN(f) (FRAME_DISPLAY_INFO (f)->screen) + +/* This is the screen index number of screen which frame F is on. */ #define FRAME_X_SCREEN_NUMBER(f) XScreenNumberOfScreen (FRAME_X_SCREEN (f)) /* This is the Visual which frame F is on. */ ------------------------------------------------------------ revno: 114287 fixes bug: http://debbugs.gnu.org/15373 committer: Glenn Morris branch nick: trunk timestamp: Sat 2013-09-14 17:35:54 -0700 message: * eshell/em-unix.el (eshell/rm): Make -f ignore missing files. Does not work until bug=15379 gets fixed. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-15 00:10:45 +0000 +++ lisp/ChangeLog 2013-09-15 00:35:54 +0000 @@ -1,5 +1,8 @@ 2013-09-15 Glenn Morris + * eshell/em-unix.el (eshell/rm): + Make -f ignore missing files. (Bug#15373) + * eshell/esh-cmd.el (eshell--local-vars): New variable. (Bug#15372) (eshell-rewrite-for-command): Add for loop vars to eshell--local-vars. * eshell/esh-var.el (eshell-get-variable): Respect eshell--local-vars. === modified file 'lisp/eshell/em-unix.el' --- lisp/eshell/em-unix.el 2013-09-12 20:15:53 +0000 +++ lisp/eshell/em-unix.el 2013-09-15 00:35:54 +0000 @@ -284,18 +284,21 @@ entry))))) (eshell-funcalln 'unintern entry))) ((stringp entry) - (if (and (file-directory-p entry) - (not (file-symlink-p entry))) - (if (or em-recursive - eshell-rm-removes-directories) - (if (or em-preview - (not em-interactive) - (y-or-n-p - (format "rm: descend into directory `%s'? " - entry))) + ;; -f should silently ignore missing files (bug#15373). + (unless (and force-removal + (not (file-exists-p entry))) + (if (and (file-directory-p entry) + (not (file-symlink-p entry))) + (if (or em-recursive + eshell-rm-removes-directories) + (if (or em-preview + (not em-interactive) + (y-or-n-p + (format "rm: descend into directory `%s'? " + entry))) (eshell-remove-entries nil (list entry) t)) - (eshell-error (format "rm: %s: is a directory\n" entry))) - (eshell-remove-entries nil (list entry) t))))) + (eshell-error (format "rm: %s: is a directory\n" entry))) + (eshell-remove-entries nil (list entry) t)))))) (setq args (cdr args))) nil)) ------------------------------------------------------------ revno: 114286 fixes bug: http://debbugs.gnu.org/15372 committer: Glenn Morris branch nick: trunk timestamp: Sat 2013-09-14 17:10:45 -0700 message: * lisp/eshell/esh-cmd.el (eshell--local-vars): New variable. (eshell-rewrite-for-command): Add for loop vars to eshell--local-vars. * lisp/eshell/esh-var.el (eshell-get-variable): Respect eshell--local-vars. * test/automated/eshell.el (eshell-test/for-name-shadow-loop): New test. (eshell-test/for-loop, eshell-test/for-name-loop): Doc fix. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-14 23:55:15 +0000 +++ lisp/ChangeLog 2013-09-15 00:10:45 +0000 @@ -1,3 +1,9 @@ +2013-09-15 Glenn Morris + + * eshell/esh-cmd.el (eshell--local-vars): New variable. (Bug#15372) + (eshell-rewrite-for-command): Add for loop vars to eshell--local-vars. + * eshell/esh-var.el (eshell-get-variable): Respect eshell--local-vars. + 2013-09-14 Glenn Morris * eshell/esh-var.el (eshell-variable-aliases-list): Fix doc typo. === modified file 'lisp/eshell/esh-cmd.el' --- lisp/eshell/esh-cmd.el 2013-09-12 20:15:53 +0000 +++ lisp/eshell/esh-cmd.el 2013-09-15 00:10:45 +0000 @@ -473,6 +473,8 @@ arg)) (defvar eshell-last-command-status) ;Define in esh-io.el. +(defvar eshell--local-vars nil + "List of locally bound vars that should take precedence over env-vars.") (defun eshell-rewrite-for-command (terms) "Rewrite a `for' command into its equivalent Eshell command form. @@ -495,7 +497,9 @@ (eshell-command-body '(nil)) (eshell-test-body '(nil))) (while (car for-items) - (let ((,(intern (cadr terms)) (car for-items))) + (let ((,(intern (cadr terms)) (car for-items)) + (eshell--local-vars (cons ',(intern (cadr terms)) + eshell--local-vars))) (eshell-protect ,(eshell-invokify-arg body t))) (setcar for-items (cadr for-items)) === modified file 'lisp/eshell/esh-var.el' --- lisp/eshell/esh-var.el 2013-09-14 23:55:15 +0000 +++ lisp/eshell/esh-var.el 2013-09-15 00:10:45 +0000 @@ -502,6 +502,7 @@ (let ((sym (intern-soft var))) (if (and sym (boundp sym) (or eshell-prefer-lisp-variables + (memq sym eshell--local-vars) ; bug#15372 (not (getenv var)))) (symbol-value sym) (getenv var)))) === modified file 'test/ChangeLog' --- test/ChangeLog 2013-09-13 17:13:52 +0000 +++ test/ChangeLog 2013-09-15 00:10:45 +0000 @@ -1,3 +1,9 @@ +2013-09-15 Glenn Morris + + * automated/eshell.el (eshell-test/for-name-shadow-loop): + New test. (Bug#15372) + (eshell-test/for-loop, eshell-test/for-name-loop): Doc fix. + 2013-09-13 Glenn Morris * automated/eshell.el (with-temp-eshell): === modified file 'test/automated/eshell.el' --- test/automated/eshell.el 2013-09-13 17:13:52 +0000 +++ test/automated/eshell.el 2013-09-15 00:10:45 +0000 @@ -75,17 +75,23 @@ (should (equal (eshell-test-command-result "(+ 1 2)") 3))) (ert-deftest eshell-test/for-loop () - "Test `eshell-command-result' with an elisp command." + "Test `eshell-command-result' with a for loop.." (let ((process-environment (cons "foo" process-environment))) (should (equal (eshell-test-command-result "for foo in 5 { echo $foo }") 5)))) (ert-deftest eshell-test/for-name-loop () ;Bug#15231 - "Test `eshell-command-result' with an elisp command." + "Test `eshell-command-result' with a for loop using `name'." (let ((process-environment (cons "name" process-environment))) (should (equal (eshell-test-command-result "for name in 3 { echo $name }") 3)))) +(ert-deftest eshell-test/for-name-shadow-loop () ; bug#15372 + "Test `eshell-command-result' with a for loop using an env-var." + (let ((process-environment (cons "name=env-value" process-environment))) + (should (equal (eshell-test-command-result + "for name in 3 { echo $name }") 3)))) + (ert-deftest eshell-test/lisp-command-args () "Test `eshell-command-result' with elisp and trailing args. Test that trailing arguments outside the S-expression are ------------------------------------------------------------ revno: 114285 committer: Glenn Morris branch nick: trunk timestamp: Sat 2013-09-14 16:55:15 -0700 message: * eshell/esh-var.el (eshell-variable-aliases-list): Fix doc typo. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-13 17:28:34 +0000 +++ lisp/ChangeLog 2013-09-14 23:55:15 +0000 @@ -1,3 +1,7 @@ +2013-09-14 Glenn Morris + + * eshell/esh-var.el (eshell-variable-aliases-list): Fix doc typo. + 2013-09-13 Glenn Morris * dired-x.el (dired-guess-shell-alist-user): Doc fix. === modified file 'lisp/eshell/esh-var.el' --- lisp/eshell/esh-var.el 2013-09-12 20:15:53 +0000 +++ lisp/eshell/esh-var.el 2013-09-14 23:55:15 +0000 @@ -184,9 +184,9 @@ indices))))) "This list provides aliasing for variable references. It is very similar in concept to what `eshell-user-aliases-list' does -for commands. Each member of this defines defines the name of a -command, and the Lisp value to return for that variable if it is -accessed via the syntax '$NAME'. +for commands. Each member of this defines the name of a command, +and the Lisp value to return for that variable if it is accessed +via the syntax '$NAME'. If the value is a function, that function will be called with two arguments: the list of the indices that was used in the reference, and ------------------------------------------------------------ revno: 114284 committer: Glenn Morris branch nick: trunk timestamp: Sat 2013-09-14 16:47:54 -0700 message: * doc/misc/eshell.texi: Markup fixes. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2013-09-11 14:06:22 +0000 +++ doc/misc/ChangeLog 2013-09-14 23:47:54 +0000 @@ -1,3 +1,7 @@ +2013-09-14 Glenn Morris + + * eshell.texi: Markup fixes. + 2013-09-11 Xue Fuqiao * ido.texi (Interactive Substring Matching): Use @key{RET} instead === modified file 'doc/misc/eshell.texi' --- doc/misc/eshell.texi 2013-07-25 07:10:56 +0000 +++ doc/misc/eshell.texi 2013-09-14 23:47:54 +0000 @@ -353,7 +353,7 @@ @vindex eshell-prefer-lisp-functions If you would prefer to use the built-in commands instead of the external -commands, set @var{eshell-prefer-lisp-functions} to @code{t}. +commands, set @code{eshell-prefer-lisp-functions} to @code{t}. Some of the built-in commands have different behaviour from their external counterparts, and some have no external counterpart. Most of @@ -515,7 +515,7 @@ with the command invocation @samp{alias ll ls -l}; with this defined, running @samp{ll foo} in Eshell will actually run @samp{ls -l foo}. Aliases defined (or deleted) by the @command{alias} command are -automatically written to the file named by @var{eshell-aliases-file}, +automatically written to the file named by @code{eshell-aliases-file}, which you can also edit directly (although you will have to manually reload it). @@ -539,7 +539,7 @@ The history ring is loaded from a file at the start of every session, and written back to the file at the end of every session. The file path -is specified in @var{eshell-history-file-name}. Unlike other shells, +is specified in @code{eshell-history-file-name}. Unlike other shells, such as Bash, Eshell can not be configured to keep a history ring of a different size than that of the history file. @@ -721,11 +721,11 @@ Programs that need a terminal to display output properly are referred to in this manual as ``visual commands,'' because they are not simply line-oriented. You must tell Eshell which commands are visual, by -adding them to @var{eshell-visual-commands}; for commands that are +adding them to @code{eshell-visual-commands}; for commands that are visual for only certain @emph{sub}-commands -- e.g. @samp{git log} but -not @samp{git status} -- use @var{eshell-visual-subcommands}; and for +not @samp{git status} -- use @code{eshell-visual-subcommands}; and for commands that are visual only when passed certain options, use -@var{eshell-visual-options}. +@code{eshell-visual-options}. @section Redirection Redirection is mostly the same in Eshell as it is in other command @@ -740,16 +740,16 @@ left-hand side. e.g., @samp{echo hello >>> #} inserts the string @code{"hello"} into the @code{*scratch*} buffer. -@var{eshell-virtual-targets} is a list of mappings of virtual device +@code{eshell-virtual-targets} is a list of mappings of virtual device names to functions. Eshell comes with two virtual devices: @file{/dev/kill}, which sends the text to the kill ring, and @file{/dev/clip}, which sends text to the clipboard. You can, of course, define your own virtual targets. They are defined -by adding a list of the form @code{("/dev/name" function mode)} to -@var{eshell-virtual-targets}. The first element is the device name; -@code{function} may be either a lambda or a function name. If -@code{mode} is nil, then the function is the output function; if it is +by adding a list of the form @samp{("/dev/name" @var{function} @var{mode})} to +@code{eshell-virtual-targets}. The first element is the device name; +@var{function} may be either a lambda or a function name. If +@var{mode} is nil, then the function is the output function; if it is non-nil, then the function is passed the redirection mode as a symbol--@code{overwrite} for @code{>}, @code{append} for @code{>>}, or @code{insert} for @code{>>>}--and the function is expected to return @@ -774,7 +774,7 @@ @example (eval-when-compile - (require 'cl) + (require 'cl-lib) (require 'esh-mode) (require 'eshell)) ------------------------------------------------------------ revno: 114283 fixes bug: http://debbugs.gnu.org/15377 author: Vivek Dasmohapatra committer: Glenn Morris branch nick: trunk timestamp: Sat 2013-09-14 16:33:19 -0700 message: * erc.el (erc-update-mode-line-buffer): Handle absent topic. diff: === modified file 'lisp/erc/ChangeLog' --- lisp/erc/ChangeLog 2013-09-13 07:34:15 +0000 +++ lisp/erc/ChangeLog 2013-09-14 23:33:19 +0000 @@ -1,3 +1,8 @@ +2013-09-14 Vivek Dasmohapatra + + * erc.el (erc-update-mode-line-buffer): + Handle absent topic. (Bug#15377) + 2013-09-13 Glenn Morris * erc-desktop-notifications.el (dbus-debug): Declare. === modified file 'lisp/erc/erc.el' --- lisp/erc/erc.el 2013-08-22 04:06:45 +0000 +++ lisp/erc/erc.el 2013-09-14 23:33:19 +0000 @@ -6189,7 +6189,7 @@ ?m (erc-format-channel-modes) ?n (or (erc-current-nick) "") ?N (erc-format-network) - ?o (erc-controls-strip erc-channel-topic) + ?o (or (erc-controls-strip erc-channel-topic) "") ?p (erc-port-to-string erc-session-port) ?s (erc-format-target-and/or-server) ?S (erc-format-target-and/or-network) ------------------------------------------------------------ revno: 114282 fixes bug: http://debbugs.gnu.org/15375 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2013-09-14 19:33:12 +0300 message: Minor fixes for last change in lispref/display.texi. diff: === modified file 'doc/lispref/display.texi' --- doc/lispref/display.texi 2013-09-14 15:34:33 +0000 +++ doc/lispref/display.texi 2013-09-14 16:33:12 +0000 @@ -4190,8 +4190,8 @@ @defvar left-margin-width This variable specifies the width of the left margin, in character -cell units. It is buffer-local in all buffers. A value of @code{nil} -means no left marginal area. +cell (a.k.a.@: ``column'') units. It is buffer-local in all buffers. +A value of @code{nil} means no left marginal area. @end defvar @defvar right-margin-width @@ -4209,16 +4209,15 @@ @defun set-window-margins window left &optional right This function specifies the margin widths for window @var{window}, in -character cell (a.k.a.@: ``column''), units. The argument @var{left} -controls the left margin and @var{right} controls the right margin -(default @code{0}). +character cell units. The argument @var{left} controls the left +margin, and @var{right} controls the right margin (default @code{0}). @end defun @defun window-margins &optional window This function returns the width of the left and right margins of @var{window} as a cons cell of the form @w{@code{(@var{left} . @var{right})}}. If one of the two marginal areas does not exist, -its width is returned as @code{nil}; if none of the two margins exist, +its width is returned as @code{nil}; if neither of the two margins exist, the function returns @code{(nil)}. If @var{window} is @code{nil}, the selected window is used. @end defun ------------------------------------------------------------ revno: 114281 fixes bug: http://debbugs.gnu.org/15375 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2013-09-14 18:34:33 +0300 message: Fix last change in lispref/display.texi. diff: === modified file 'doc/lispref/display.texi' --- doc/lispref/display.texi 2013-09-14 09:24:34 +0000 +++ doc/lispref/display.texi 2013-09-14 15:34:33 +0000 @@ -4219,7 +4219,7 @@ @var{window} as a cons cell of the form @w{@code{(@var{left} . @var{right})}}. If one of the two marginal areas does not exist, its width is returned as @code{nil}; if none of the two margins exist, -the function returns @code{nil}. If @var{window} is @code{nil}, the +the function returns @code{(nil)}. If @var{window} is @code{nil}, the selected window is used. @end defun ------------------------------------------------------------ revno: 114280 committer: Glenn Morris branch nick: trunk timestamp: Sat 2013-09-14 06:19:38 -0400 message: Auto-commit of loaddefs files. diff: === modified file 'lisp/dired.el' --- lisp/dired.el 2013-09-10 10:21:34 +0000 +++ lisp/dired.el 2013-09-14 10:19:38 +0000 @@ -4352,7 +4352,7 @@ ;;;*** -;;;### (autoloads nil "dired-x" "dired-x.el" "11fd4a8afa32507cc32d4a04d852587f") +;;;### (autoloads nil "dired-x" "dired-x.el" "732d08c173295dd14a0736fa222f532a") ;;; Generated autoloads from dired-x.el (autoload 'dired-jump "dired-x" "\ ------------------------------------------------------------ revno: 114279 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2013-09-14 12:26:42 +0300 message: Fix src/ChangeLog entry of last commit. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-09-14 09:24:34 +0000 +++ src/ChangeLog 2013-09-14 09:26:42 +0000 @@ -1,6 +1,6 @@ 2013-09-14 Eli Zaretskii - * buffer.c (syms_of_buffer) : + * buffer.c (syms_of_buffer) : Doc fix. (Bug#15375) 2013-09-13 Dmitry Antipov ------------------------------------------------------------ revno: 114278 fixes bug: http://debbugs.gnu.org/15375 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2013-09-14 12:24:34 +0300 message: Fix bug #15375 with inaccurate docs of display margin width values. doc/lispref/display.texi (Display Margins): State the units of measuring margin width. src/buffer.c (syms_of_buffer) : Doc fix. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2013-09-13 08:26:03 +0000 +++ doc/lispref/ChangeLog 2013-09-14 09:24:34 +0000 @@ -1,3 +1,8 @@ +2013-09-14 Eli Zaretskii + + * display.texi (Display Margins): State the units of measuring + margin width. (Bug#15375) + 2013-09-13 Eli Zaretskii * text.texi (Not Intervals): Minor wording fix. === modified file 'doc/lispref/display.texi' --- doc/lispref/display.texi 2013-08-16 05:15:51 +0000 +++ doc/lispref/display.texi 2013-09-14 09:24:34 +0000 @@ -4189,13 +4189,15 @@ variables: @defvar left-margin-width -This variable specifies the width of the left margin. -It is buffer-local in all buffers. +This variable specifies the width of the left margin, in character +cell units. It is buffer-local in all buffers. A value of @code{nil} +means no left marginal area. @end defvar @defvar right-margin-width -This variable specifies the width of the right margin. -It is buffer-local in all buffers. +This variable specifies the width of the right margin, in character +cell units. It is buffer-local in all buffers. A value of @code{nil} +means no right marginal area. @end defvar Setting these variables does not immediately affect the window. These @@ -4206,15 +4208,19 @@ You can also set the margin widths immediately. @defun set-window-margins window left &optional right -This function specifies the margin widths for window @var{window}. -The argument @var{left} controls the left margin and -@var{right} controls the right margin (default @code{0}). +This function specifies the margin widths for window @var{window}, in +character cell (a.k.a.@: ``column''), units. The argument @var{left} +controls the left margin and @var{right} controls the right margin +(default @code{0}). @end defun @defun window-margins &optional window -This function returns the left and right margins of @var{window} -as a cons cell of the form @code{(@var{left} . @var{right})}. -If @var{window} is @code{nil}, the selected window is used. +This function returns the width of the left and right margins of +@var{window} as a cons cell of the form @w{@code{(@var{left} +. @var{right})}}. If one of the two marginal areas does not exist, +its width is returned as @code{nil}; if none of the two margins exist, +the function returns @code{nil}. If @var{window} is @code{nil}, the +selected window is used. @end defun @node Images === modified file 'src/ChangeLog' --- src/ChangeLog 2013-09-13 16:46:18 +0000 +++ src/ChangeLog 2013-09-14 09:24:34 +0000 @@ -1,3 +1,8 @@ +2013-09-14 Eli Zaretskii + + * buffer.c (syms_of_buffer) : + Doc fix. (Bug#15375) + 2013-09-13 Dmitry Antipov Unify Fx_focus_frame between all ports. === modified file 'src/buffer.c' --- src/buffer.c 2013-09-03 14:40:09 +0000 +++ src/buffer.c 2013-09-14 09:24:34 +0000 @@ -5900,7 +5900,7 @@ DEFVAR_PER_BUFFER ("left-margin-width", &BVAR (current_buffer, left_margin_cols), Qintegerp, - doc: /* Width of left marginal area for display of a buffer. + doc: /* Width in columns of left marginal area for display of a buffer. A value of nil means no marginal area. Setting this variable does not take effect until a new buffer is displayed @@ -5908,7 +5908,7 @@ DEFVAR_PER_BUFFER ("right-margin-width", &BVAR (current_buffer, right_margin_cols), Qintegerp, - doc: /* Width of right marginal area for display of a buffer. + doc: /* Width in columns of right marginal area for display of a buffer. A value of nil means no marginal area. Setting this variable does not take effect until a new buffer is displayed ------------------------------------------------------------ revno: 114277 fixes bug: http://debbugs.gnu.org/15363 committer: Glenn Morris 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. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-13 16:46:18 +0000 +++ lisp/ChangeLog 2013-09-13 17:28:34 +0000 @@ -1,3 +1,8 @@ +2013-09-13 Glenn Morris + + * 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 * frame.el (x-focus-frame): Mark as declared in frame.c. === modified file 'lisp/dired-x.el' --- lisp/dired-x.el 2013-09-10 01:28:01 +0000 +++ 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."