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

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

[nongnu] elpa/anzu ef489aadb2 118/288: Fix replacement issue(#22)


From: ELPA Syncer
Subject: [nongnu] elpa/anzu ef489aadb2 118/288: Fix replacement issue(#22)
Date: Thu, 6 Jan 2022 03:58:45 -0500 (EST)

branch: elpa/anzu
commit ef489aadb206f995a9801328d74b752a52128482
Author: Syohei YOSHIDA <syohex@gmail.com>
Commit: Syohei YOSHIDA <syohex@gmail.com>

    Fix replacement issue(#22)
---
 anzu.el | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/anzu.el b/anzu.el
index 1f3227baa8..63ec15d2ff 100644
--- a/anzu.el
+++ b/anzu.el
@@ -385,11 +385,13 @@
       (insert from-string)
       (goto-char (point-min))
       (when (re-search-forward from-regexp nil t)
-        (if (consp compiled)
-            (replace-match (funcall (car compiled) (cdr compiled)
-                                    replacements) t)
-          (replace-match compiled t))
-        (buffer-substring (point-min) (point-max))))))
+        (or (ignore-errors
+              (if (consp compiled)
+                  (replace-match (funcall (car compiled) (cdr compiled)
+                                          replacements) t)
+                (replace-match compiled t))
+              (buffer-substring (point-min) (point-max)))
+            "")))))
 
 (defun anzu--overlay-sort (a b)
   (< (overlay-start a) (overlay-start b)))



reply via email to

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