unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Brian Leung <leungbk@posteo.net>
To: 53853@debbugs.gnu.org
Subject: bug#53853: [PATCH] Don't use string-replace in flymake
Date: Mon, 07 Feb 2022 16:11:28 +0000	[thread overview]
Message-ID: <m2h79a4pxr.fsf@posteo.net> (raw)

[-- 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


             reply	other threads:[~2022-02-07 16:11 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-07 16:11 Brian Leung [this message]
2022-02-07 17:32 ` bug#53853: [PATCH] Don't use string-replace in flymake 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2h79a4pxr.fsf@posteo.net \
    --to=leungbk@posteo.net \
    --cc=53853@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).