From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.bugs Subject: bug#39094: 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> References: <5ddfcabc.1c69fb81.626d0.c7a5@mx.google.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0003_01D5C962.49D03EE0" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="33974"; mail-complaints-to="usenet@blaine.gmane.org" To: 39094@debbugs.gnu.org, eliz@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 12 09:09:06 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iqYHI-000vQE-Q9 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 12 Jan 2020 09:07:20 +0100 Original-Received: from localhost ([::1]:36054 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iqYHH-0005tg-0j for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 12 Jan 2020 03:07:19 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38829) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iqYH3-0005tO-Ea for bug-gnu-emacs@gnu.org; Sun, 12 Jan 2020 03:07:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iqYH0-0000ah-74 for bug-gnu-emacs@gnu.org; Sun, 12 Jan 2020 03:07:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51021) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iqYGz-0000Zk-Vj for bug-gnu-emacs@gnu.org; Sun, 12 Jan 2020 03:07:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iqYGz-0006Ce-Q1 for bug-gnu-emacs@gnu.org; Sun, 12 Jan 2020 03:07:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 12 Jan 2020 08:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 39094 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: , "'Eli Zaretskii'" Original-Received: via spool by submit@debbugs.gnu.org id=B.157881641423830 (code B ref -1); Sun, 12 Jan 2020 08:07:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Jan 2020 08:06:54 +0000 Original-Received: from localhost ([127.0.0.1]:56994 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iqYGr-0006CH-EW for submit@debbugs.gnu.org; Sun, 12 Jan 2020 03:06:54 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:50540) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iqYGp-0006CA-Ut for submit@debbugs.gnu.org; Sun, 12 Jan 2020 03:06:52 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38195) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iqYGo-0005sR-Uo for bug-gnu-emacs@gnu.org; Sun, 12 Jan 2020 03:06:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iqYGn-0008Rw-IK for bug-gnu-emacs@gnu.org; Sun, 12 Jan 2020 03:06:50 -0500 Original-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 ) id 1iqYGn-0008O3-92 for bug-gnu-emacs@gnu.org; Sun, 12 Jan 2020 03:06:49 -0500 Original-Received: by mail-pf1-x436.google.com with SMTP id i23so3336115pfo.2 for ; 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) Original-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) In-Reply-To: <5ddfcabc.1c69fb81.626d0.c7a5@mx.google.com> 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org gmane.emacs.bugs:174499 Archived-At: 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" =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--