From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#53853: [PATCH] Don't use string-replace in flymake Date: Mon, 07 Feb 2022 18:32:44 +0100 Message-ID: <87r18e7fb7.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8379"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 53853@debbugs.gnu.org To: Brian Leung Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 07 18:58:04 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nH8H6-0001xJ-5k for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 07 Feb 2022 18:58:04 +0100 Original-Received: from localhost ([::1]:45802 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nH8H5-0008Fd-6K for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 07 Feb 2022 12:58:03 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:42588) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nH7ss-0005cz-Na for bug-gnu-emacs@gnu.org; Mon, 07 Feb 2022 12:33:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49727) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nH7ss-0007bb-Do for bug-gnu-emacs@gnu.org; Mon, 07 Feb 2022 12:33:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nH7ss-0004Px-7c for bug-gnu-emacs@gnu.org; Mon, 07 Feb 2022 12:33:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 07 Feb 2022 17:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53853 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 53853-submit@debbugs.gnu.org id=B53853.164425517716967 (code B ref 53853); Mon, 07 Feb 2022 17:33:02 +0000 Original-Received: (at 53853) by debbugs.gnu.org; 7 Feb 2022 17:32:57 +0000 Original-Received: from localhost ([127.0.0.1]:43624 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nH7sm-0004Pb-Vu for submit@debbugs.gnu.org; Mon, 07 Feb 2022 12:32:57 -0500 Original-Received: from mail-wr1-f46.google.com ([209.85.221.46]:43706) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nH7si-0004PJ-KT for 53853@debbugs.gnu.org; Mon, 07 Feb 2022 12:32:56 -0500 Original-Received: by mail-wr1-f46.google.com with SMTP id c19so11413111wrb.10 for <53853@debbugs.gnu.org>; Mon, 07 Feb 2022 09:32:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-transfer-encoding; bh=r9Vc6dkdx0s39oO+767OaB4Fxw6ZfujUckxG0ay67Xo=; b=cEfo/5AGBOeW/qOCdNZpfA4aSe/2pnWmRJcELJz3zhnx7ZK5snhyOm3uIbmoqNN+5w +2XoVTQDgjCs+iCxOscTuOeT+YUG7SoBPKiFVxwWhcPoYM6unzIyY8dQWZ7qdHbsVm+E c92qOjLzSFnxW5BWY859jgJczTQm3CMDRx84SVrIF7TlxGEBbRzUJBlUOKVgUpuX54pj 0ZvAuR//g3m8NHJKwnFmHEJrA2B+qop/N7WCEle858lnsUHEeBEJN6qnzKWkfgKPhYSy 1Ih4PLE/OrvViUvvS3ITWspXULSSVneqyuXeQ9YVApmZ1tKkxJYgr+rUzDBidyfIn0x7 1/9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=r9Vc6dkdx0s39oO+767OaB4Fxw6ZfujUckxG0ay67Xo=; b=D8ts8njBU3qOzhaZiClOEqiQeX4uMJp18HrmrjxR5XAaUSGVVDyFVw+R5LqoBfX2r4 SyRmJH9ncswe1rclV84AL22TL9MjMIrxe7D8/orp4Bfa1Ttcgv5txknMDjHTdMdOMUIN 3VwIM2WfFhusXqqSaSsGL0jrEkHz2P7PZYu6rSCeTluDDHTVLXIqdX2nckHri17iwFIG 0Y11jlzThZTXC3oVSiHlQMOErpWx1U9kBtk4OQb+G6bVo8Ue/czXTS+OAG+NQBNNfleh xyS1Q/cf5oNq3c+XRpl8QS1KmYqdxbMgOQNrVlRp14HY3WEYIYYtOly/ZNNQ1hT64NdT DxHA== X-Gm-Message-State: AOAM532Jq+U4OyJOaBs9mgUdXJi5tAwX0HR+LIGO9JL/9Lbp4mEBf3qK Pa3lJgTMYoIPBsAHoo4qIJd7/ZfSsrg= X-Google-Smtp-Source: ABdhPJwisqGt3YHu7WCjvsFWErHoCUH39yqUTTlZSjP5YUnZeILM4q6upQ+l4iyDJWBsabL4HSjNaw== X-Received: by 2002:adf:a343:: with SMTP id d3mr407785wrb.356.1644255166054; Mon, 07 Feb 2022 09:32:46 -0800 (PST) Original-Received: from rltb ([2a01:e0a:3f3:fb50:ae9c:f7e1:47ab:fed]) by smtp.gmail.com with ESMTPSA id o3sm10244785wrq.70.2022.02.07.09.32.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Feb 2022 09:32:45 -0800 (PST) In-Reply-To: (Brian Leung's message of "Mon, 07 Feb 2022 16:11:28 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:226272 Archived-At: >>>>> On Mon, 07 Feb 2022 16:11:28 +0000, Brian Leung = said: Brian> From e08cd430e2c0acbf063ad2d6a2d8d093745a5c7c Mon Sep 17 00:00:0= 0 2001 Brian> From: Brian Leung 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 wi= th 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=CA=BCre 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 count= ers." 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 (curren= t-buffer)))))) Brian> (display-warning (list 'flymake sublog) Brian> (apply #'format-message msg args) Brian> (if (numberp level) Brian> --=20 Brian> 2.34.1 Robert --=20