unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#53853: [PATCH] Don't use string-replace in flymake
@ 2022-02-07 16:11 Brian Leung
  2022-02-07 17:32 ` Robert Pluim
  0 siblings, 1 reply; 27+ messages in thread
From: Brian Leung @ 2022-02-07 16:11 UTC (permalink / raw)
  To: 53853

[-- Attachment #1: Type: text/plain, Size: 848 bytes --]

Tags: patch

Tags: patch

See attached. Older Emacsen don't have string-replace.

In GNU Emacs 28.0.91 (build 1, aarch64-apple-darwin21.3.0, Carbon Version 165 AppKit 2113.3)
 of 2022-02-02 built on Brians-Mac-mini.local
Windowing system distributor 'Apple Inc.', version 12.2.0
System Description:  macOS 12.2

Configured using:
 'configure --enable-locallisppath=/opt/homebrew/share/emacs/site-lisp
 --infodir=/opt/homebrew/Cellar/emacs-mac/HEAD-674407f/share/info/emacs
 --prefix=/opt/homebrew/Cellar/emacs-mac/HEAD-674407f --with-mac
 --enable-mac-app=/opt/homebrew/Cellar/emacs-mac/HEAD-674407f
 --with-gnutls --with-modules --with-native-compilation
 'CFLAGS=-I/opt/homebrew/opt/gcc/include
 -I/opt/homebrew/opt/libgccjit/include'
 'LDFLAGS=-L/opt/homebrew/lib/gcc/11 -I/opt/homebrew/opt/gcc/include
 -I/opt/homebrew/opt/libgccjit/include''


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Don-t-use-string-replace-in-flymake.patch --]
[-- Type: text/patch, Size: 1149 bytes --]

From e08cd430e2c0acbf063ad2d6a2d8d093745a5c7c Mon Sep 17 00:00:00 2001
From: Brian Leung <leungbk@posteo.net>
Date: Mon, 7 Feb 2022 07:56:13 -0800
Subject: [PATCH] Don't use string-replace in flymake

* lisp/progmodes/flymake.el (flymake--log-1): Stay compatible with
older Emacsen.
---
 lisp/progmodes/flymake.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 0c16ddedcb..e369cb1f21 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -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)
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2022-02-09  8:55 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-07 16:11 bug#53853: [PATCH] Don't use string-replace in flymake Brian Leung
2022-02-07 17:32 ` Robert Pluim
2022-02-08  2:17   ` Brian Leung
2022-02-08  6:16     ` Lars Ingebrigtsen
2022-02-08  8:21       ` Robert Pluim
2022-02-08  8:28         ` Brian Leung
2022-02-08  8:35           ` Robert Pluim
2022-02-08  9:20             ` João Távora
2022-02-08  9:50               ` Robert Pluim
2022-02-08  9:54                 ` João Távora
2022-02-08  9:58                   ` João Távora
2022-02-08 13:03                     ` Eli Zaretskii
2022-02-08 13:18                       ` João Távora
2022-02-08 13:54                         ` Eli Zaretskii
2022-02-08 14:09                           ` João Távora
2022-02-08 15:07                             ` Robert Pluim
2022-02-08 15:30                               ` João Távora
2022-02-08 15:47                                 ` Robert Pluim
2022-02-08 15:51                                   ` João Távora
2022-02-08 16:02                                     ` Robert Pluim
2022-02-08 16:43                                       ` João Távora
2022-02-08 17:02                                         ` Robert Pluim
2022-02-08 17:55                                         ` Dmitry Gutov
2022-02-08 17:08                                 ` Dmitry Gutov
2022-02-09  8:55                                   ` Robert Pluim
2022-02-08  9:52         ` João Távora
2022-02-08 10:19           ` Robert Pluim

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).