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

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

[nongnu] elpa/rust-mode 2df6cf7 439/486: Don't fail on re-search-forward


From: ELPA Syncer
Subject: [nongnu] elpa/rust-mode 2df6cf7 439/486: Don't fail on re-search-forward. (#359)
Date: Sat, 7 Aug 2021 09:26:10 -0400 (EDT)

branch: elpa/rust-mode
commit 2df6cf72163db57fd0c79fefd0e79f38f29f7d93
Author: Nathan Moreau <nathan.moreau@m4x.org>
Commit: GitHub <noreply@github.com>

    Don't fail on re-search-forward. (#359)
---
 rust-mode.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rust-mode.el b/rust-mode.el
index 59d6675..e7ef1ef 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -1483,7 +1483,7 @@ This is written mainly to be used as 
`end-of-defun-function' for Rust."
 (defun rust--format-fix-rustfmt-buffer (buffer-name)
   (with-current-buffer (get-buffer rust-rustfmt-buffername)
     (goto-char (point-min))
-    (while (re-search-forward "--> <stdin>:")
+    (while (re-search-forward "--> <stdin>:" nil t)
       (replace-match (format "--> %s:" buffer-name)))))
 
 ;; If rust-mode has been configured to navigate to source of the error
@@ -1514,7 +1514,7 @@ rustfmt complain in the echo area."
       (let ((target-buffer (with-current-buffer rustfmt
                              (save-excursion
                                (goto-char (point-min))
-                               (when (re-search-forward "--> \\([^:]+\\):")
+                               (when (re-search-forward "--> \\([^:]+\\):" nil 
t)
                                  (match-string 1)))))
             (target-point (with-current-buffer rustfmt
                             ;; No save-excursion, this is how we cycle through!



reply via email to

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