]> git.eshelyaron.com Git - emacs.git/commitdiff
flymake: Ensure compatibility with older Emacsen
authorBrian Leung <leungbk@posteo.net>
Tue, 8 Feb 2022 06:16:25 +0000 (07:16 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 8 Feb 2022 06:16:55 +0000 (07:16 +0100)
* lisp/progmodes/flymake.el (flymake--log-1): Use
replace-regexp-in-string instead of Emacs 28's
string-replace (bug#53853).

lisp/progmodes/flymake.el

index 0c16ddedcbeb939ea7d99e55ddcd36fb40c9e9e9..e369cb1f21e3bb08d7fe7fa29f8563958950fc9c 100644 (file)
@@ -267,8 +267,8 @@ If set to nil, don't suppress any zero counters."
          (format " [%s %s]"
                  (or sublog 'flymake)
                  ;; Handle file names with "%" correctly.  (Bug#51549)
-                 (string-replace "%" "%%"
-                                 (buffer-name (current-buffer))))))
+                 (replace-regexp-in-string "%" "%%"
+                                           (buffer-name (current-buffer))))))
     (display-warning (list 'flymake sublog)
                      (apply #'format-message msg args)
                      (if (numberp level)