GNU bug report logs - #25362
26.0.50; comment-region goes into an infinite loop

Previous Next

Packages: emacs, cc-mode;

Reported by: Dima Kogan <dima <at> secretsauce.net>

Date: Wed, 4 Jan 2017 23:38:01 UTC

Severity: normal

Tags: confirmed

Found in version 26.0.50

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Dima Kogan <dima <at> secretsauce.net>
Subject: bug#25362: closed (Re: bug#25362: 26.0.50; comment-region goes
 into an infinite loop)
Date: Wed, 11 Jan 2017 18:33:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#25362: 26.0.50; comment-region goes into an infinite loop

which was filed against the emacs,cc-mode package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 25362 <at> debbugs.gnu.org.

-- 
25362: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=25362
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Alan Mackenzie <acm <at> muc.de>
To: 25362-done <at> debbugs.gnu.org
Cc: Eli Zaretskii <eliz <at> gnu.org>, Dima Kogan <dima <at> secretsauce.net>
Subject: Re: bug#25362: 26.0.50; comment-region goes into an infinite loop
Date: Wed, 11 Jan 2017 18:32:02 +0000
Bug fixed.  Closing.

-- 
Alan Mackenzie (Nuremberg, Germany).

[Message part 3 (message/rfc822, inline)]
From: Dima Kogan <dima <at> secretsauce.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.0.50; comment-region goes into an infinite loop
Date: Wed, 04 Jan 2017 15:37:25 -0800
[Message part 4 (text/plain, inline)]
Hi. I'm using a very recent emacs built from master:

  eb3416016b4

I'm observing (comment-region) go into an infinite loop when presented
with particular data. I'm attaching a small source file that
demonstrates the issue. To see it break, run this:

    emacs --eval '(add-hook (quote c-mode-common-hook) (lambda () (setq comment-start "//" comment-end "")))'  \
          --eval '(global-set-key (kbd "<f5>") (lambda () (interactive) (comment-region 16 45)))'              \
          -Q tst6.c

This loads the demo file with a clean configuration, and runs two bits
of lisp:

1. Sets up a c++ commenting style. This is required for the issue to
   present itself

2. Binds f5 to run the problematic (comment-region)

On my machine, invoking emacs that way, and then hitting f5 shows the problem.

[tst6.c (text/x-csrc, inline)]
void f(void)
{

    g( // output
      s );

}

This bug report was last modified 8 years and 183 days ago.

Previous Next


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