GNU bug report logs - #6158
bug in hideshow (trunk)

Previous Next

Package: emacs;

Reported by: Theodor Rascanu <erazortt <at> googlemail.com>

Date: Mon, 10 May 2010 16:32:02 UTC

Severity: normal

Tags: patch

Merged with 8279

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6158 in the body.
You can then email your comments to 6158 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6158; Package emacs. (Mon, 10 May 2010 16:32:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Theodor Rascanu <erazortt <at> googlemail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 10 May 2010 16:32:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Theodor Rascanu <erazortt <at> googlemail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: bug in hideshow (trunk)
Date: Mon, 10 May 2010 17:32:45 +0200
[Message part 1 (text/plain, inline)]
Hi all,

I guess I have found a the bug in the hideshow package:

Assume the following c++ code:

inline int round_to_next_power2(register unsigned int x){
  //if(x!=32){
  x--;
  x |= (x >> 1);
  x |= (x >> 2);
  x |= (x >> 4);
  x |= (x >> 8);
  x |= (x >> 16);
  return x + 1;
  //}
}

Ok this example do not make much sense programming wise but it shows the
probelm:
Hiding this function will not work.
Having the cursor somewhere inside the function outside the commented lines
and trying to hide it (i.e. by C-c @ C-c) will produce the following:

inline int round_to_next_power2(register unsigned int x){
//if(x!=32){... }

Attached is a patch producing the expected behaviour:
inline int round_to_next_power2(register unsigned int x){... }

Greetings,
Theodor
[Message part 2 (text/html, inline)]
[emacs-hideshow_comment.patch (text/x-patch, attachment)]

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6158; Package emacs. (Wed, 26 May 2010 23:31:01 GMT) Full text and rfc822 format available.

Message #8 received at 6158 <at> debbugs.gnu.org (full text, mbox):

From: Theodor Rascanu <erazortt <at> googlemail.com>
To: 6158 <at> debbugs.gnu.org
Date: Thu, 27 May 2010 00:53:02 +0200
[Message part 1 (text/plain, inline)]
Hi again,

here a enhanced version of the patch.

greets
[Message part 2 (text/html, inline)]
[emacs-hideshow_comment.patch (text/x-patch, attachment)]

Added tag(s) patch. Request was from Stefan Monnier <monnier <at> iro.umontreal.ca> to control <at> debbugs.gnu.org. (Sun, 21 Nov 2010 16:38:01 GMT) Full text and rfc822 format available.

Forcibly Merged 6158 8279. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 06 Oct 2011 19:29:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 04 Nov 2011 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 285 days ago.

Previous Next


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