aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2016-07-14 09:45:05 -0400
committerStefan Monnier2016-07-14 09:45:05 -0400
commit0ea47a6159f351f32b7dbc68debe99eb02f2dd8d (patch)
tree479f787171addd2c6f5bf8933c6da286b5cdb710
parentd0dc74a3a8bc59df3ca88810710d1234a9a08920 (diff)
downloademacs-0ea47a6159f351f32b7dbc68debe99eb02f2dd8d.tar.gz
emacs-0ea47a6159f351f32b7dbc68debe99eb02f2dd8d.zip
* lisp/simple.el (shell-command): Add save-match-data comment
-rw-r--r--lisp/simple.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 6d7f00f52f4..a757876328b 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3328,6 +3328,8 @@ the use of a shell (with its need to quote arguments)."
3328 (current-buffer))))) 3328 (current-buffer)))))
3329 ;; Output goes in a separate buffer. 3329 ;; Output goes in a separate buffer.
3330 ;; Preserve the match data in case called from a program. 3330 ;; Preserve the match data in case called from a program.
3331 ;; FIXME: It'd be ridiculous for an Elisp function to call
3332 ;; shell-command and assume that it won't mess the match-data!
3331 (save-match-data 3333 (save-match-data
3332 (if (string-match "[ \t]*&[ \t]*\\'" command) 3334 (if (string-match "[ \t]*&[ \t]*\\'" command)
3333 ;; Command ending with ampersand means asynchronous. 3335 ;; Command ending with ampersand means asynchronous.