GNU bug report logs - #39094
27.0.50; ; [PATCH] * makefile-edit.el: regexp-quote the param in makefile-move-to-macro to avoid error message

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: <lin.sun@HIDDEN>; Keywords: patch; merged with #38014, #38416; dated Sun, 12 Jan 2020 08:07:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Merged 38014 38416 39094. Request was from Noam Postavsky <npostavs@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 12 Jan 2020 08:06:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 12 03:06:54 2020
Received: from localhost ([127.0.0.1]:56994 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iqYGr-0006CH-EW
	for submit <at> debbugs.gnu.org; Sun, 12 Jan 2020 03:06:54 -0500
Received: from lists.gnu.org ([209.51.188.17]:50540)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <lin.sun@HIDDEN>) id 1iqYGp-0006CA-Ut
 for submit <at> debbugs.gnu.org; Sun, 12 Jan 2020 03:06:52 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:38195)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <lin.sun@HIDDEN>) id 1iqYGo-0005sR-Uo
 for bug-gnu-emacs@HIDDEN; Sun, 12 Jan 2020 03:06:51 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,URIBL_BLOCKED
 autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <lin.sun@HIDDEN>) id 1iqYGn-0008Rw-IK
 for bug-gnu-emacs@HIDDEN; Sun, 12 Jan 2020 03:06:50 -0500
Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]:35503)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <lin.sun@HIDDEN>) id 1iqYGn-0008O3-92
 for bug-gnu-emacs@HIDDEN; Sun, 12 Jan 2020 03:06:49 -0500
Received: by mail-pf1-x436.google.com with SMTP id i23so3336115pfo.2
 for <bug-gnu-emacs@HIDDEN>; Sun, 12 Jan 2020 00:06:49 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zoom.us; s=google;
 h=from:to:references:in-reply-to:subject:date:message-id:mime-version
 :thread-index:content-language;
 bh=I7i96YX6wtYWteQznrjEmQwqAVwHdVQZy7fpT8gM48w=;
 b=EEBxpA4ARU9N0ZQZUmFQp6i6ggq/tpsGbk1bTcioD9dnVlwSQ8oZ4CK9ePChfzK5dH
 w4l6HJNDD1yqCoAZWYAvNTooeuKJIJ4WMQCNGIDUwbD801dkRnfgeiJle58xK/59IxOc
 vYyyJyiQar9riLZEU5RYSTIffP0XgzUWjeec4=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:references:in-reply-to:subject:date
 :message-id:mime-version:thread-index:content-language;
 bh=I7i96YX6wtYWteQznrjEmQwqAVwHdVQZy7fpT8gM48w=;
 b=m68IesNA5Krqf2FhOmrm4tP7JSrWsTHvkbFZzUBpoFvhFwTFKSFY2OMYv+5SW1VpL3
 tdcUY40WHHo3Wr70RnpvjcRQ3r2iebrUJ/61kT2nsbeveOhC5QlhfRf4KXbs01Kaz60o
 vUMxyqk7u0w8GU+BPg2vE1otU46LfoU71KWk3nfsnD9gVa2reeAr0rCXjfpJQtI7/UE2
 v64IKww6fHhxAgT9T0CHWAu2zuL6lRqSN+2c0CNeJ7VwnrhPEfyOd4gSOh8jNPdcnEI5
 b8k/eOiFETIFn6GtSxbWJqc4XoJ1+mU8bnk50Mv9wL5DVb2meCDnQT4gOwPITznB3SwP
 ADbA==
X-Gm-Message-State: APjAAAUzSwy0IeD02mBOqAEpxE6FbhXDh85UgiF22NCPAk4a8D2du2mq
 9RwyJYt7TNcstF5aZ9kPCu8A7qw5IiRsXul8T/a7cOZ/oZYFzP931rYHTifmGIdMge2bR2U1wmG
 /uWfRrMdtPyFnpn1QxNYMH6igo2oPMNrwCE7xb5MlcJT+KAZnR/eUw9FtKXrA
X-Google-Smtp-Source: APXvYqzncRNVfmgh+rvGAvaQMvczEaJBbolxzaq7GaapG/pqj771/dpv0tU8ptq2+uYx5pCfYtRWUw==
X-Received: by 2002:a63:a53:: with SMTP id z19mr14895570pgk.267.1578816407274; 
 Sun, 12 Jan 2020 00:06:47 -0800 (PST)
Received: from DESKTOP71C1N5K ([38.99.100.2])
 by smtp.gmail.com with ESMTPSA id p35sm8971901pgl.47.2020.01.12.00.06.44
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Sun, 12 Jan 2020 00:06:46 -0800 (PST)
From: <lin.sun@HIDDEN>
To: <bug-gnu-emacs@HIDDEN>,
	"'Eli Zaretskii'" <eliz@HIDDEN>
References: <5ddfcabc.1c69fb81.626d0.c7a5@HIDDEN>
In-Reply-To: <5ddfcabc.1c69fb81.626d0.c7a5@HIDDEN>
Subject: 27.0.50; ; [PATCH] * makefile-edit.el: regexp-quote the param in
 makefile-move-to-macro to avoid error message
Date: Sun, 12 Jan 2020 16:06:43 +0800
Message-ID: <000201d5c91f$3bac3b90$b304b2b0$@zoom.us>
MIME-Version: 1.0
Content-Type: multipart/mixed;
 boundary="----=_NextPart_000_0003_01D5C962.49D03EE0"
X-Mailer: Microsoft Outlook 16.0
Thread-Index: AQJLQUOmqDIbovY9wIUTc2SKtL4kWKb7uLeQ
Content-Language: en-us
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-Received-From: 2607:f8b0:4864:20::436
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

This is a multipart message in MIME format.

------=_NextPart_000_0003_01D5C962.49D03EE0
Content-Type: text/plain;
	charset="utf-8"
Content-Transfer-Encoding: quoted-printable

Hi Eli,

The attachment is a patch to fix the complaint message from =
`makefile-move-to-macro' for the param for re-search-forward isn't =
escaped.
To reproduce the issue, just run follow commands in your shell,
$ echo 'AM_LIBTMP_LIBS:=3D$(shell X \--libs)' > /tmp/Makefile.am
$ emacs -Q --eval '(progn (global-ede-mode t)(semantic-mode t)(find-file =
"/tmp/Makefile.am"))'

Could you please review and apply the patch?=20
Thank you.

B.R.
Lin Sun

------=_NextPart_000_0003_01D5C962.49D03EE0
Content-Type: application/octet-stream;
	name="0001-Fix-the-error-message-from-makefile-move-to-macro.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="0001-Fix-the-error-message-from-makefile-move-to-macro.patch"

From 9dfa710fd57095cceb025f665e71772f93e6bbe4 Mon Sep 17 00:00:00 2001=0A=
From: "lin.sun" <lin.sun@HIDDEN>=0A=
Date: Fri, 1 Nov 2019 10:25:17 +0800=0A=
Subject: [PATCH] Fix the error message from `makefile-move-to-macro'=0A=
=0A=
* makefile-edit.el: regexp-quote the param in makefile-move-to-macro.=0A=
With `(global-ede-mode t)' and `(semantic-mode t)' enabled, error=0A=
happened when open a Makefile.am which has '$' or '\\' in its macro=0A=
list. Simply create a Makefile.am include the line=0A=
'AM_LIBTMP_LIBS:=3D$(shell X \--libs)', open the file with ede and=0A=
semantic mode enabled will trigger this issue. Escape the param for=0A=
re-search-forward in `makefile-move-to-macro' can fix this.=0A=
---=0A=
 lisp/cedet/ede/makefile-edit.el | 2 +-=0A=
 1 file changed, 1 insertion(+), 1 deletion(-)=0A=
=0A=
diff --git a/lisp/cedet/ede/makefile-edit.el =
b/lisp/cedet/ede/makefile-edit.el=0A=
index 7d8a44b..add1675 100644=0A=
--- a/lisp/cedet/ede/makefile-edit.el=0A=
+++ b/lisp/cedet/ede/makefile-edit.el=0A=
@@ -78,7 +78,7 @@ makefile-move-to-macro=0A=
 If NEXT is non-nil, move to the next occurrence of MACRO."=0A=
   (let ((oldpt (point)))=0A=
     (when (not next) (goto-char (point-min)))=0A=
-    (if (re-search-forward (concat "^\\s-*" macro "\\s-*[+:?]?=3D") nil =
t)=0A=
+    (if (re-search-forward (concat "^\\s-*" (regexp-quote macro) =
"\\s-*[+:?]?=3D") nil t)=0A=
 	t=0A=
       (goto-char oldpt)=0A=
       nil)))=0A=
-- =0A=
2.2.0=0A=
=0A=

------=_NextPart_000_0003_01D5C962.49D03EE0--





Acknowledgement sent to <lin.sun@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#39094; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 12 Jan 2020 14:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.