emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 0ea47a6: * lisp/simple.el (shell-command): Add save


From: Stefan Monnier
Subject: [Emacs-diffs] master 0ea47a6: * lisp/simple.el (shell-command): Add save-match-data comment
Date: Thu, 14 Jul 2016 13:45:08 +0000 (UTC)

branch: master
commit 0ea47a6159f351f32b7dbc68debe99eb02f2dd8d
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>

    * lisp/simple.el (shell-command): Add save-match-data comment
---
 lisp/simple.el |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/lisp/simple.el b/lisp/simple.el
index 6d7f00f..a757876 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -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.



reply via email to

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