emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/shell-command+ c395408 05/36: Re-added % substitution


From: Stefan Monnier
Subject: [elpa] externals/shell-command+ c395408 05/36: Re-added % substitution
Date: Fri, 25 Sep 2020 11:01:22 -0400 (EDT)

branch: externals/shell-command+
commit c3954087c7858fbf496bd6bbd1b37fc9e46bef78
Author: Philip K <philip@warpmail.net>
Commit: Philip K <philip@warpmail.net>

    Re-added % substitution
---
 bang.el | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/bang.el b/bang.el
index 068fed9..070018d 100644
--- a/bang.el
+++ b/bang.el
@@ -119,7 +119,13 @@ insert a literal % quote it using a backslash."
           (has-< (match-string-no-properties 4 command))
           (has-> (match-string-no-properties 5 command))
           (has-| (match-string-no-properties 6 command))
-          (rest  (match-string-no-properties 7 command)))
+          (rest (condition-case nil
+                    (replace-regexp-in-string
+                     (rx (* ?\\ ?\\) (or ?\\ (group "%")))
+                     buffer-file-name
+                     (match-string-no-properties 7 command)
+                     nil nil 1)
+                  (error (match-string-no-properties 7 command)))))
       (cond (arg-! (bang (bang--find-last-command arg-!)
                          beg end))
             (num-! (bang (bang--get-command-number num-! rest)



reply via email to

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