From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Brian Leung Newsgroups: gmane.emacs.bugs Subject: bug#53853: [PATCH] Don't use string-replace in flymake Date: Mon, 07 Feb 2022 16:11:28 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11914"; mail-complaints-to="usenet@ciao.gmane.io" To: 53853@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 07 18:13:25 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 1nH7Zs-0002r6-UC for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 07 Feb 2022 18:13:24 +0100 Original-Received: from localhost ([::1]:35210 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nH7Zp-0002Fq-KX for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 07 Feb 2022 12:13:21 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:44694) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nH6vq-00078s-Tj for bug-gnu-emacs@gnu.org; Mon, 07 Feb 2022 11:32:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49566) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nH6vq-0004LR-Kk for bug-gnu-emacs@gnu.org; Mon, 07 Feb 2022 11:32:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nH6vq-0002mj-D9 for bug-gnu-emacs@gnu.org; Mon, 07 Feb 2022 11:32:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Brian Leung Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 07 Feb 2022 16:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 53853 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.164425150210673 (code B ref -1); Mon, 07 Feb 2022 16:32:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Feb 2022 16:31:42 +0000 Original-Received: from localhost ([127.0.0.1]:43463 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nH6vT-0002m2-JD for submit@debbugs.gnu.org; Mon, 07 Feb 2022 11:31:42 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:52198) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nH6cT-0002F4-94 for submit@debbugs.gnu.org; Mon, 07 Feb 2022 11:12:03 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:35840) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nH6cS-0000kp-SC for bug-gnu-emacs@gnu.org; Mon, 07 Feb 2022 11:12:01 -0500 Original-Received: from mout02.posteo.de ([185.67.36.66]:34121) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nH6cN-0000Cj-36 for bug-gnu-emacs@gnu.org; Mon, 07 Feb 2022 11:12:00 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 57934240103 for ; Mon, 7 Feb 2022 17:11:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1644250310; bh=k6guebLMEegfjJQIMjFYd7pK4xc2jc3cAOQyvlL+Mzo=; h=From:To:Subject:Date:From; b=UN87Rrj7V0kMbSqv7ICohUcMRzOj266hJVg5JzvGvWCGJkOjnvfv91CiOY/ublpGL fGB3doqBXh0MWGNUWlTTw7r7x2qPtIqVCNjmdTSYwGZYr4aCjvnDcRAVRL5A80sNXR yeQTh9emerpEm1whJNyze699euN+prHfar3kI2dhB6OZsAwiawykGF3wg31n/3W8qj tUn1dFEtkC8TIlzGmHY59YIUVwcsImtbdCzFZcWqudqF6VCqnQA5qMl9BQk+vBGWxP mXvDSmzFhRI205qi+Qfq0PdYQCZpuI1IwRnP2H9IX+vr7058/ecE4gR8o9LAWd9k5b l2rNbiZ9o8Tbg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4JsrkF2LVSz6tq5 for ; Mon, 7 Feb 2022 17:11:49 +0100 (CET) Received-SPF: pass client-ip=185.67.36.66; envelope-from=leungbk@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 07 Feb 2022 11:31:38 -0500 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:226267 Archived-At: --=-=-= Content-Type: text/plain 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'' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Don-t-use-string-replace-in-flymake.patch >From e08cd430e2c0acbf063ad2d6a2d8d093745a5c7c Mon Sep 17 00:00:00 2001 From: Brian Leung 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 --=-=-=--