flymake: Ensure compatibility with older Emacsen

* lisp/progmodes/flymake.el (flymake--log-1): Use
replace-regexp-in-string instead of Emacs 28's
string-replace (bug#53853).
This commit is contained in:
Brian Leung 2022-02-08 07:16:25 +01:00 committed by Lars Ingebrigtsen
parent 0d46ee2dde
commit 82e74e4559

View 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)