(shell-command): Match & only at end of whole command.

This commit is contained in:
Eli Zaretskii 2002-07-06 13:25:16 +00:00
parent faee5a401d
commit 092af46eea
2 changed files with 5 additions and 1 deletions

View file

@ -1,3 +1,7 @@
2002-07-06 Richard M. Stallman <rms@gnu.org>
* simple.el (shell-command): Match & only at end of whole command.
2002-07-03 Dave Love <fx@gnu.org>
* ediff-diff.el (ediff-wordify): Bind ediff-forward-word-function

View file

@ -1265,7 +1265,7 @@ specifies the value of ERROR-BUFFER."
(current-buffer)))))
;; Preserve the match data in case called from a program.
(save-match-data
(if (string-match "[ \t]*&[ \t]*$" command)
(if (string-match "[ \t]*&[ \t]*\\'" command)
;; Command ending with ampersand means asynchronous.
(let ((buffer (get-buffer-create
(or output-buffer "*Async Shell Command*")))