From: Brian Leung <leungbk@posteo.net>
To: Robert Pluim <rpluim@gmail.com>
Cc: 53853@debbugs.gnu.org
Subject: bug#53853: [PATCH] Don't use string-replace in flymake
Date: Tue, 08 Feb 2022 02:17:44 +0000 [thread overview]
Message-ID: <m2a6f23xqc.fsf@posteo.net> (raw)
In-Reply-To: <87r18e7fb7.fsf@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 141 bytes --]
OK, I've updated the patch per your suggestions. I've also made
the commit apply to the emacs-28 branch, as opposed to the master
branch.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-flymake-Ensure-compatibility-with-older-Emacsen.patch --]
[-- Type: text/x-patch, Size: 1205 bytes --]
From afa46b0808384a90d760262bf8bf676a509aa194 Mon Sep 17 00:00:00 2001
From: Brian Leung <leungbk@posteo.net>
Date: Mon, 7 Feb 2022 07:56:13 -0800
Subject: [PATCH] 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)
---
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
[-- Attachment #3: Type: text/plain, Size: 1964 bytes --]
Robert Pluim <rpluim@gmail.com> writes:
>>>>>> On Mon, 07 Feb 2022 16:11:28 +0000, Brian Leung
>>>>>> <leungbk@posteo.net> said:
>
> Brian> From e08cd430e2c0acbf063ad2d6a2d8d093745a5c7c Mon Sep
> 17 00:00:00 2001
> Brian> From: Brian Leung <leungbk@posteo.net>
> Brian> Date: Mon, 7 Feb 2022 07:56:13 -0800
> Brian> Subject: [PATCH] Don't use string-replace in flymake
>
> Brian> * lisp/progmodes/flymake.el (flymake--log-1): Stay
> compatible with
> Brian> older Emacsen.
>
> This bit is the 'why', and thus needs to be in the preamble. In
> the
> ChangeLog entry you should explain what change youʼre making
> "use
> replace-regexp-in-string instead..." . And please put
> (Bug#53853)
> somewhere in the commit message.
>
> Brian> ---
> Brian> lisp/progmodes/flymake.el | 4 ++--
> Brian> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> Brian> diff --git a/lisp/progmodes/flymake.el
> b/lisp/progmodes/flymake.el
> Brian> index 0c16ddedcb..e369cb1f21 100644
> Brian> --- a/lisp/progmodes/flymake.el
> Brian> +++ b/lisp/progmodes/flymake.el
> Brian> @@ -267,8 +267,8 @@ If set to nil, don't suppress any
> zero counters."
> Brian> (format " [%s %s]"
> Brian> (or sublog 'flymake)
> Brian> ;; Handle file names with "%"
> correctly. (Bug#51549)
> Brian> - (string-replace "%" "%%"
> Brian> - (buffer-name
> (current-buffer))))))
> Brian> + (replace-regexp-in-string "%" "%%"
> Brian> +
> (buffer-name (current-buffer))))))
> Brian> (display-warning (list 'flymake sublog)
> Brian> (apply #'format-message msg
> args)
> Brian> (if (numberp level)
> Brian> --
> Brian> 2.34.1
>
>
>
> Robert
next prev parent reply other threads:[~2022-02-08 2:17 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2a6f23xqc.fsf@posteo.net \
--to=leungbk@posteo.net \
--cc=53853@debbugs.gnu.org \
--cc=rpluim@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.