GNU bug report logs - #42251
28.0.50; [PATCH] cperl-mode: Regression in fontifying HERE-docs

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: Harald Jörg <haj@HIDDEN>; Keywords: patch fixed; Done: Lars Ingebrigtsen <larsi@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
bug marked as fixed in version 28.1, send any further explanations to 42251 <at> debbugs.gnu.org and Harald Jörg <haj@HIDDEN> Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at 42251) by debbugs.gnu.org; 5 Aug 2020 15:20:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 05 11:20:35 2020
Received: from localhost ([127.0.0.1]:51979 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1k3LDX-0000bE-1V
	for submit <at> debbugs.gnu.org; Wed, 05 Aug 2020 11:20:35 -0400
Received: from quimby.gnus.org ([95.216.78.240]:42834)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1k3LDV-0000aw-Bw
 for 42251 <at> debbugs.gnu.org; Wed, 05 Aug 2020 11:20:33 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID
 :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=Djbj5iirgVuu0fGHDoiIqD/k3QCTKLmsA7XuzbJnCfU=; b=aKFFebtNTcxEbyTMto2hPwwn8/
 kv+aF4LF5Ge106ekSThGnZDj20H3NgZacQ1f/jTRsYiM89pDNWuGrH8JpHCf3KWyxGK7c/DdRoNlF
 3iT9ijqfe13B9PyEbuNPigX8uAUUSWwXGN2Ox4TvdlxtfN+cj6pmvoWD/GvFMwjqz8YA=;
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo)
 by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1k3LDF-00064i-4b; Wed, 05 Aug 2020 17:20:27 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Harald =?utf-8?Q?J=C3=B6rg?= <haj@HIDDEN>
Subject: Re: bug#42251: 28.0.50; [PATCH] cperl-mode: Regression in
 fontifying HERE-docs
References: <19ca77ef-738a-a8d2-8231-2d24d4e47fbd@HIDDEN>
Date: Wed, 05 Aug 2020 17:20:15 +0200
In-Reply-To: <19ca77ef-738a-a8d2-8231-2d24d4e47fbd@HIDDEN> ("Harald
 =?utf-8?Q?J=C3=B6rg=22's?=
 message of "Tue, 7 Jul 2020 22:07:14 +0200")
Message-ID: <87eeoljf0w.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 
 Content preview:  Harald Jörg <haj@HIDDEN> writes: > This is an old-style
    HERE-document which is terminated by the string > "HERE" which starts in
   the leftmost column. cperl-mode in the master > branch wrongly uses the first
    occurrence of "HERE" to te [...] 
 
 Content analysis details:   (-2.9 points, 5.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
                             [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 42251
Cc: 42251 <at> debbugs.gnu.org
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: -1.0 (-)

Harald J=C3=B6rg <haj@HIDDEN> writes:

> This is an old-style HERE-document which is terminated by the string
> "HERE" which starts in the leftmost column.  cperl-mode in the master
> branch wrongly uses the first occurrence of "HERE" to terminate the
> string, resulting in badly fontified / indented code which follows.
>
> The bug was introduced by an incomplete fix for (Bug:#27254) to support
> indented HERE-documents in the commit
> 2017-07-12T15:07:55Z!vividsnow@HIDDEN
>
> A patch to cover this edge case is attached.

Thanks; applied to Emacs 28.

--=20
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#42251; Package emacs. Full text available.

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


Received: (at submit) by debbugs.gnu.org; 7 Jul 2020 20:07:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 07 16:07:24 2020
Received: from localhost ([127.0.0.1]:36739 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jstsC-0007EY-9c
	for submit <at> debbugs.gnu.org; Tue, 07 Jul 2020 16:07:24 -0400
Received: from lists.gnu.org ([209.51.188.17]:42192)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <haj@HIDDEN>) id 1jsts9-0007EQ-JZ
 for submit <at> debbugs.gnu.org; Tue, 07 Jul 2020 16:07:22 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:59964)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <haj@HIDDEN>) id 1jsts9-0004O3-Cr
 for bug-gnu-emacs@HIDDEN; Tue, 07 Jul 2020 16:07:21 -0400
Received: from mout02.posteo.de ([185.67.36.66]:51889)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <haj@HIDDEN>) id 1jsts6-0002nu-EG
 for bug-gnu-emacs@HIDDEN; Tue, 07 Jul 2020 16:07:21 -0400
Received: from submission (posteo.de [89.146.220.130]) 
 by mout02.posteo.de (Postfix) with ESMTPS id 1CC1C240100
 for <bug-gnu-emacs@HIDDEN>; Tue,  7 Jul 2020 22:07:15 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017;
 t=1594152435; bh=WT8cpUSmar9x0QIoI+1HqALupBV/e9QTRE0Bj4HhIp4=;
 h=From:Subject:To:Autocrypt:Date:From;
 b=hmDXwO6XNxcyHrCpyHfEClnnNXkoPJbnckuFFEQuMA+IHulaJ4xNtsSHRKgPy6smB
 F4ekAh488LEUWCZlMX1WCH05sNK3e+6/o4WW1UUekHcpTXlTkStgqAT52DxzYts+oy
 06BCuurrjcqD2WQ3g31NUjUF2PlNdSiv5+nL8Nnft551RhqkVHjlArIgeoeHDYkp8A
 kLSyOHSfoEGu2XmeI4fEZb73S+gr8acxdnHCj9g9G7zca+dQb19V2sCf73bO3k00jk
 n++pPIibfdWaFQXzuB/zuKzWcYGG2hSld9VR8sGrCCYmGR8WcdpmwuTm4ZjGM8kq1f
 l9Ec6JrJttM9Q==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4B1YPZ4wFmz9rxL
 for <bug-gnu-emacs@HIDDEN>; Tue,  7 Jul 2020 22:07:14 +0200 (CEST)
From: =?UTF-8?Q?Harald_J=c3=b6rg?= <haj@HIDDEN>
Subject: 28.0.50; [PATCH] cperl-mode: Regression in fontifying HERE-docs
To: bug-gnu-emacs@HIDDEN
Autocrypt: addr=haj@HIDDEN; keydata=
 mQINBF0DVrIBEAC7TRlIilBg/5Dx7R2rV4FBDEavbyMT2cS2wWyksh7JA8e17LNmTdakf+Bm
 u6C2m6+frolteYRlkreoyAg0fj/5tDw/s5dJDw3tM0b+m/pj2HcwTSRpQSEy5lBiCg11E6Mt
 F9UngCfkGtJzu8PBWXc1RDQVBwRn5MZbpMZZatE8NOq9AA3Yg6sY11Ez3xIvYU2R7a4OSxmc
 RJV2+dhdQ4oOTBIGQ2urQSU81kyRtkx+/Yh8WefMrk9nF3nzYziLS53euCAXyzklwYmD6Li3
 XSu7wYp5fISky9DK6DPFK7h4RXEL4GFAhy31ehrVnNTcGRohM1Dm9BV9dwXkwlaeT3q0X+nE
 SXVqPDHtv748bXNIg2WVCZ0WgShcA46XVlSE9Fm+w0HI/1m1L4BaMmQ7gyK5dEchbhxohkk0
 AqC3hEJ4ULRidrsCoCWGMFKiOIb9rjeC00vhrUkVJDkPWEGLXjhnRQykb6cESko0rPrSDLqX
 9YqaNQ6KO9Un6uogE7YnXYg35EXJ8ORdX257IbXNbFVpgM8FFsl48WV3Pl9WNdADhnnOrz3O
 wzyK58i/BTsnjVX8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+TTgzNIemji
 AsnleF4J+/xNczT+QQusHYtByZ6FRWqKPxLl3NE9h5e4Uy5QpwXCCI97ZA248Hmp
Message-ID: <19ca77ef-738a-a8d2-8231-2d24d4e47fbd@HIDDEN>
Date: Tue, 7 Jul 2020 22:07:14 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.10.0
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------9C48C13E9017BF5872527BD1"
Content-Language: en-US
Received-SPF: pass client-ip=185.67.36.66; envelope-from=haj@HIDDEN;
 helo=mout02.posteo.de
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/07 16:07:15
X-ACL-Warn: Detected OS   = Linux 3.11 and newer
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, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN
X-Spam_action: no action
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 multi-part message in MIME format.
--------------9C48C13E9017BF5872527BD1
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

In the master branch, insert the following code into a buffer and
activate cperl-mode:

# ---
sub just_for_indenting {
    my $here = <<HERE;
    test for a not indented here-doc containing
    HERE
    which should not terminate the here-doc
HERE
    return;
}
# ---

This is an old-style HERE-document which is terminated by the string
"HERE" which starts in the leftmost column.  cperl-mode in the master
branch wrongly uses the first occurrence of "HERE" to terminate the
string, resulting in badly fontified / indented code which follows.

The bug was introduced by an incomplete fix for (Bug:#27254) to support
indented HERE-documents in the commit
2017-07-12T15:07:55Z!vividsnow@HIDDEN

A patch to cover this edge case is attached.


In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw
scroll bars)
 of 2020-07-07 built on hajtower
Repository revision: 6b80ff3c465f87a31ccaaf41b2b521075f43632d
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
System Description: Debian GNU/Linux 10 (buster)

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Configured features:
XPM JPEG TIFF GIF PNG SOUND NOTIFY INOTIFY GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS LUCID X11 XDBE XIM MODULES THREADS PDUMPER GMP

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config
gnus-util rmail rmail-loaddefs text-property-search time-date subr-x seq
byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib
sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
font-core term/tty-colors frame minibuffer cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads inotify
dynamic-setting x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 45105 8978)
 (symbols 48 6124 1)
 (strings 32 16147 1957)
 (string-bytes 1 511756)
 (vectors 16 9750)
 (vector-slots 8 164900 10931)
 (floats 8 21 43)
 (intervals 56 200 0)
 (buffers 992 10))


--------------9C48C13E9017BF5872527BD1
Content-Type: text/x-patch; charset=UTF-8;
 name="0001-lisp-progmodes-cperl-mode.el-Correctly-terminate-HER.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
 filename*0="0001-lisp-progmodes-cperl-mode.el-Correctly-terminate-HER.pa";
 filename*1="tch"

=46rom 065cab114c638b8f1b3a1a50a7a159fedcaebf38 Mon Sep 17 00:00:00 2001
From: =3D?UTF-8?q?Harald=3D20J=3DC3=3DB6rg?=3D <haj@HIDDEN>
Date: Tue, 7 Jul 2020 18:10:31 +0200
Subject: [PATCH] * lisp/progmodes/cperl-mode.el: Correctly terminate HERE=
-docs

This patch repairs a regression introduced by (Bug:#27254).
---
 lisp/progmodes/cperl-mode.el | 37 ++++++++++++++++++------------------
 1 file changed, 19 insertions(+), 18 deletions(-)

diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index cdbb59a5ad..5879ba7ed2 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -3560,19 +3560,18 @@ cperl-find-pods-heres
 	   "\\(\\`\n?\\|^\n\\)=3D"	; POD
 	   "\\|"
 	   ;; One extra () before this:
-	   "<<~?"			; HERE-DOC
-	   "\\("			; 1 + 1
+	   "<<\\(~?\\)"		 ; HERE-DOC, indented-p =3D capture 2
+	   "\\("			; 2 + 1
 	   ;; First variant "BLAH" or just ``.
 	   "[ \t]*"			; Yes, whitespace is allowed!
-	   "\\([\"'`]\\)"		; 2 + 1 =3D 3
-	   "\\([^\"'`\n]*\\)"		; 3 + 1
-	   "\\3"
+	   "\\([\"'`]\\)"		; 3 + 1 =3D 4
+	   "\\([^\"'`\n]*\\)"		; 4 + 1
+	   "\\4"
 	   "\\|"
 	   ;; Second variant: Identifier or \ID (same as 'ID') or empty
-	   "\\\\?\\(\\([a-zA-Z_][a-zA-Z_0-9]*\\)?\\)" ; 4 + 1, 5 + 1
+	   "\\\\?\\(\\([a-zA-Z_][a-zA-Z_0-9]*\\)?\\)" ; 5 + 1, 6 + 1
 	   ;; Do not have <<=3D or << 30 or <<30 or << $blah.
 	   ;; "\\([^=3D \t0-9$@%&]\\|[ \t]+[^ \t\n0-9$@%&]\\)" ; 6 + 1
-	   "\\(\\)"		; To preserve count of pars :-( 6 + 1
 	   "\\)"
 	   "\\|"
 	   ;; 1+6 extra () before this:
@@ -3762,11 +3761,11 @@ cperl-find-pods-heres
 	       ;;    ;; "\\([^=3D \t0-9$@%&]\\|[ \t]+[^ \t\n0-9$@%&]\\)" ; 6 + =
1
 	       ;;    "\\(\\)"		; To preserve count of pars :-( 6 + 1
 	       ;;  "\\)"
-	       ((match-beginning 2)	; 1 + 1
+	       ((match-beginning 3)	; 2 + 1
 		(setq b (point)
 		      tb (match-beginning 0)
 		      c (and		; not HERE-DOC
-			 (match-beginning 5)
+			 (match-beginning 6)
 			 (save-match-data
 			   (or (looking-at "[ \t]*(") ; << function_call()
 			       (save-excursion ; 1 << func_name, or $foo << 10
@@ -3793,17 +3792,17 @@ cperl-find-pods-heres
 						   (looking-at "\\(printf?\\|say\\|system\\|exec\\|sort\\)\\>")))
 						(error t)))))))
 				   (error nil))) ; func(<<EOF)
-			       (and (not (match-beginning 6)) ; Empty
+			       (and (not (match-beginning 7)) ; Empty
 				    (looking-at
 				     "[ \t]*[=3D0-9$@%&(]"))))))
 		(if c			; Not here-doc
 		    nil			; Skip it.
-		  (setq c (match-end 2)) ; 1 + 1
-		  (if (match-beginning 5) ;4 + 1
-		      (setq b1 (match-beginning 5) ; 4 + 1
-			    e1 (match-end 5)) ; 4 + 1
-		    (setq b1 (match-beginning 4) ; 3 + 1
-			  e1 (match-end 4))) ; 3 + 1
+		  (setq c (match-end 3)) ; 2 + 1
+		  (if (match-beginning 6) ;6 + 1
+		      (setq b1 (match-beginning 6) ; 5 + 1
+			    e1 (match-end 6)) ; 5 + 1
+		    (setq b1 (match-beginning 5) ; 4 + 1
+			  e1 (match-end 5))) ; 4 + 1
 		  (setq tag (buffer-substring b1 e1)
 			qtag (regexp-quote tag))
 		  (cond (cperl-pod-here-fontify
@@ -3818,8 +3817,10 @@ cperl-find-pods-heres
 		  (setq b (point))
 		  ;; We do not search to max, since we may be called from
 		  ;; some hook of fontification, and max is random
-		  (or (and (re-search-forward (concat "^[ \t]*" qtag "$")
-					      stop-point 'toend)
+		  (or (and (re-search-forward
+			    (concat "^" (when (equal (match-string 2) "~") "[ \t]*")
+				    qtag "$")
+			    stop-point 'toend)
 			   ;;;(eq (following-char) ?\n) ; XXXX WHY???
 			   )
 		    (progn		; Pretend we matched at the end
--=20
2.20.1


--------------9C48C13E9017BF5872527BD1--




Acknowledgement sent to Harald Jörg <haj@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#42251; 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: Wed, 5 Aug 2020 15:30:02 UTC

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