bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#53853: [PATCH] Don't use string-replace in flymake


From: Brian Leung
Subject: bug#53853: [PATCH] Don't use string-replace in flymake
Date: Tue, 08 Feb 2022 02:17:44 +0000

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.

Attachment: 0001-flymake-Ensure-compatibility-with-older-Emacsen.patch
Description: Text Data


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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]