Commit 0ea47a61 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* lisp/simple.el (shell-command): Add save-match-data comment

parent d0dc74a3
......@@ -3328,6 +3328,8 @@ the use of a shell (with its need to quote arguments)."
(current-buffer)))))
;; Output goes in a separate buffer.
;; Preserve the match data in case called from a program.
;; FIXME: It'd be ridiculous for an Elisp function to call
;; shell-command and assume that it won't mess the match-data!
(save-match-data
(if (string-match "[ \t]*&[ \t]*\\'" command)
;; Command ending with ampersand means asynchronous.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment