From debbugs-submit-bounces@debbugs.gnu.org Mon May 10 12:31:59 2010 Received: (at submit) by debbugs.gnu.org; 10 May 2010 16:31:59 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OBVte-0006eK-M7 for submit@debbugs.gnu.org; Mon, 10 May 2010 12:31:59 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OBUyg-0006DZ-V2 for submit@debbugs.gnu.org; Mon, 10 May 2010 11:33:07 -0400 Received: from lists.gnu.org ([199.232.76.165]:46270) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OBUyc-0004IF-2o for submit@debbugs.gnu.org; Mon, 10 May 2010 11:33:02 -0400 Received: from [140.186.70.92] (port=46905 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OBUyW-0007nd-R5 for bug-gnu-emacs@gnu.org; Mon, 10 May 2010 11:33:01 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,T_DKIM_INVALID,T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OBUyP-00036u-S8 for bug-gnu-emacs@gnu.org; Mon, 10 May 2010 11:32:56 -0400 Received: from mail-ew0-f214.google.com ([209.85.219.214]:57359) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OBUyP-00036Q-Nl for bug-gnu-emacs@gnu.org; Mon, 10 May 2010 11:32:49 -0400 Received: by ewy6 with SMTP id 6so1303221ewy.32 for ; Mon, 10 May 2010 08:32:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=i1QtXqncwDIQKIS3uKP/+DKUXLC18ZK7tiB25nYAmRU=; b=Nckz9U14inRS1Bww83r7AgdX2tfyRVneoN6ZKLhHneLvzNsV6MPcgDw9KEWYHLbt4t vsWzBr7gB8TMtmwNjUDa+hmM1Z+evy0LAbV3VPGE4T/Z4LHJAZRHkuwTv7tv8cChlfG6 CpCRIZ3KDHjGBzXbO3hGTE5qJvyLpKwmfjirc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=l0zlHtEWvgYTkiRxh02CcVQM4uI2w7PiIr007LcuZt6ZDyOknB8d0xebO2ONvRgU2A 8yxYeXElVlj6a+gCJLcok+7bBctLbnk3yYFuRymFxif30IU7jn1Vvw6qIxxue6u6lfs7 6XPY65YDwMAt/tSGXJ3sBlj0Vhfz3r5GIDgME= MIME-Version: 1.0 Received: by 10.239.177.77 with SMTP id u13mr462732hbf.26.1273505566128; Mon, 10 May 2010 08:32:46 -0700 (PDT) Received: by 10.239.150.69 with HTTP; Mon, 10 May 2010 08:32:45 -0700 (PDT) Date: Mon, 10 May 2010 17:32:45 +0200 Message-ID: Subject: bug in hideshow (trunk) From: Theodor Rascanu To: bug-gnu-emacs@gnu.org Content-Type: multipart/mixed; boundary=001485f0acc8e37b4c04863f1e95 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 10 May 2010 12:31:57 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) --001485f0acc8e37b4c04863f1e95 Content-Type: multipart/alternative; boundary=001485f0acc8e37b4204863f1e93 --001485f0acc8e37b4204863f1e93 Content-Type: text/plain; charset=ISO-8859-1 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 --001485f0acc8e37b4204863f1e93 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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){
=A0 //if(x!=3D32){
=A0 x--;
=A0 x |=3D (x >> 1);
=A0 x |=3D (x >> 2);
=A0 x |=3D (x >> 4);
=A0 x |=3D (x >> 8);
=A0 x |=3D (x >> 16);
=A0 return x + 1;
=A0 //}
}

Ok this example do not make much sense programming wise but it shows the pr= obelm:
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!=3D32){... }

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

Greetings,
Theodor
--001485f0acc8e37b4204863f1e93-- --001485f0acc8e37b4c04863f1e95 Content-Type: text/x-patch; charset=US-ASCII; name="emacs-hideshow_comment.patch" Content-Disposition: attachment; filename="emacs-hideshow_comment.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_g91g9vf90 LS0tIGxpc3AvcHJvZ21vZGVzL2hpZGVzaG93LmVsLm9yaWcJMjAxMC0wNS0xMCAxMzoyMTo0OC41 NTU3MzIzMjMgKzAyMDAKKysrIGxpc3AvcHJvZ21vZGVzL2hpZGVzaG93LmVsCTIwMTAtMDUtMTAg MTM6MjE6NDAuNzQ1NjQ2MTMwICswMjAwCkBAIC02OTAsMTAgKzY5MCwxMiBAQCBSZXR1cm4gcG9p bnQsIG9yIG5pbCBpZiBvcmlnaW5hbCBwb2ludCB3CiAgICAgICAgIChwb2ludCkKICAgICAgIDs7 IGxvb2sgYmFja3dhcmQgZm9yIHRoZSBzdGFydCBvZiBhIGJsb2NrIHRoYXQgY29udGFpbnMgdGhl IGN1cnNvcgogICAgICAgKHdoaWxlIChhbmQgKHJlLXNlYXJjaC1iYWNrd2FyZCBocy1ibG9jay1z dGFydC1yZWdleHAgbmlsIHQpCi0gICAgICAgICAgICAgICAgICAobm90IChzZXRxIGRvbmUKLSAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgKDwgaGVyZSAoc2F2ZS1leGN1cnNpb24KLSAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChocy1mb3J3YXJkLXNleHAgKG1hdGNo LWRhdGEgdCkgMSkKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChwb2lu dCkpKSkpKSkKKyAgICAgICAgICAgICAgICAgIChzZXRxIGRvbmUKKwkJCSAgICAgKDwgaGVyZSAo c2F2ZS1leGN1cnNpb24KKwkJCQkgICAgICAgKGhzLWZvcndhcmQtc2V4cCAobWF0Y2gtZGF0YSB0 KSAxKQorCQkJCSAgICAgICAocG9pbnQpKSkpCisJCSAgKGhzLWluc2lkZS1jb21tZW50LXApCisJ CSAgKG5vdCAoc2V0cSBkb25lIG5pbCkpKSkKICAgICAgIChpZiBkb25lCiAgICAgICAgICAgKHBv aW50KQogICAgICAgICAoZ290by1jaGFyIGhlcmUpCg== --001485f0acc8e37b4c04863f1e95-- From debbugs-submit-bounces@debbugs.gnu.org Wed May 26 19:30:30 2010 Received: (at 6158) by debbugs.gnu.org; 26 May 2010 23:30:31 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHQ3S-0004Kd-7R for submit@debbugs.gnu.org; Wed, 26 May 2010 19:30:30 -0400 Received: from mail-fx0-f44.google.com ([209.85.161.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHPTG-000468-JG for 6158@debbugs.gnu.org; Wed, 26 May 2010 18:53:07 -0400 Received: by fxm14 with SMTP id 14so267482fxm.3 for <6158@debbugs.gnu.org>; Wed, 26 May 2010 15:53:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=lh5I+GSsShaHqFfIL/akQr4Ooo5vOMbY28f61AjJ5Hk=; b=wvCvbEutg0ht9Bqsr73tciFky56YG/7ObUYB/iybVgMoJxZdgipmkd+MKtg39O1yUh jw8sQ5gSejKaO7hC2SGndGpA215o8i5hgDjrdi1F2KOMCSce/Axg0ZYKh1SdB8FjJw0E HqGD7lVCOsJAGveNDkkPdhq36ThM09x2TU0IM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=XdHBpYKlW/sqy3hAJo2tsmGSKRHlc11ln2kY4+YvgcCCcTyP0Rci/+sEJZWr2lldIo WclQgi5DoWwmypz8nPKWp0GD7jEf/pTn7K9ikHQc7tDojYyKJNmrBUe4OKRYXZeiUL0Y 9BHU+2RWKX84e7cuk2PLQgHPqF0PQ49APLtDE= MIME-Version: 1.0 Received: by 10.239.163.147 with SMTP id p19mr787086hbd.62.1274914382211; Wed, 26 May 2010 15:53:02 -0700 (PDT) Received: by 10.239.150.69 with HTTP; Wed, 26 May 2010 15:53:02 -0700 (PDT) Date: Thu, 27 May 2010 00:53:02 +0200 Message-ID: Subject: From: Theodor Rascanu To: 6158@debbugs.gnu.org Content-Type: multipart/mixed; boundary=001485f7d486deecb60487872236 X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: 6158 X-Mailman-Approved-At: Wed, 26 May 2010 19:30:28 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) --001485f7d486deecb60487872236 Content-Type: multipart/alternative; boundary=001485f7d486deeca00487872234 --001485f7d486deeca00487872234 Content-Type: text/plain; charset=ISO-8859-1 Hi again, here a enhanced version of the patch. greets --001485f7d486deeca00487872234 Content-Type: text/html; charset=ISO-8859-1 Hi again,

here a enhanced version of the patch.

greets
--001485f7d486deeca00487872234-- --001485f7d486deecb60487872236 Content-Type: text/x-patch; charset=US-ASCII; name="emacs-hideshow_comment.patch" Content-Disposition: attachment; filename="emacs-hideshow_comment.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_g9oqzyjz0 LS0tIGxpc3AvcHJvZ21vZGVzL2hpZGVzaG93LmVsLm9yaWcJMjAxMC0wNS0xMiAxODoyODowNi41 NDM5MzY0MjkgKzAyMDAKKysrIGxpc3AvcHJvZ21vZGVzL2hpZGVzaG93LmVsCTIwMTAtMDUtMTIg MTg6Mjc6NDAuMjEyOTM2NzUxICswMjAwCkBAIC02OTEsOSArNjkxLDExIEBAIFJldHVybiBwb2lu dCwgb3IgbmlsIGlmIG9yaWdpbmFsIHBvaW50IHcKICAgICAgIDs7IGxvb2sgYmFja3dhcmQgZm9y IHRoZSBzdGFydCBvZiBhIGJsb2NrIHRoYXQgY29udGFpbnMgdGhlIGN1cnNvcgogICAgICAgKHdo aWxlIChhbmQgKHJlLXNlYXJjaC1iYWNrd2FyZCBocy1ibG9jay1zdGFydC1yZWdleHAgbmlsIHQp CiAgICAgICAgICAgICAgICAgICAobm90IChzZXRxIGRvbmUKLSAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgKDwgaGVyZSAoc2F2ZS1leGN1cnNpb24KLSAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIChocy1mb3J3YXJkLXNleHAgKG1hdGNoLWRhdGEgdCkgMSkKLSAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChwb2ludCkpKSkpKSkKKwkJCSAgICAg KGFuZCAoPCBoZXJlIAorCQkJCSAgICAgKHNhdmUtZXhjdXJzaW9uCisJCQkJICAgICAgIChocy1m b3J3YXJkLXNleHAgKG1hdGNoLWRhdGEgdCkgMSkKKwkJCQkgICAgICAgKHBvaW50KSkpCisJCQkJ ICAoZXEgKGhzLWluc2lkZS1jb21tZW50LXApIG5pbCkpKSkpKQogICAgICAgKGlmIGRvbmUKICAg ICAgICAgICAocG9pbnQpCiAgICAgICAgIChnb3RvLWNoYXIgaGVyZSkK --001485f7d486deecb60487872236-- From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 21 11:37:37 2010 Received: (at control) by debbugs.gnu.org; 21 Nov 2010 16:37:37 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PKCuw-0008DL-GY for submit@debbugs.gnu.org; Sun, 21 Nov 2010 11:37:37 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PKCj5-00087u-6J for control@debbugs.gnu.org; Sun, 21 Nov 2010 11:25:15 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap4PANfX6ExMCqtq/2dsb2JhbAChW31xAYYitWOFSwSEWo1pgzoC X-IronPort-AV: E=Sophos;i="4.59,232,1288584000"; d="scan'208";a="83136893" Received: from 76-10-171-106.dsl.teksavvy.com (HELO ceviche.home) ([76.10.171.106]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 21 Nov 2010 11:30:27 -0500 Received: by ceviche.home (Postfix, from userid 20848) id 10E7B660F5; Sun, 21 Nov 2010 11:30:27 -0500 (EST) From: Stefan Monnier Subject: Re: bug#6158: Message-ID: References: Date: Sun, 21 Nov 2010 11:30:27 -0500 In-Reply-To: (Theodor Rascanu's message of "Thu, 27 May 2010 00:53:02 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain To: undisclosed-recipients:; X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: control X-Mailman-Approved-At: Sun, 21 Nov 2010 11:37:28 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.1 (-) tags 6158 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 06 15:28:11 2011 Received: (at control) by debbugs.gnu.org; 6 Oct 2011 19:28:11 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBtc2-0001xi-RT for submit@debbugs.gnu.org; Thu, 06 Oct 2011 15:28:11 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBtc0-0001xb-Ve for control@debbugs.gnu.org; Thu, 06 Oct 2011 15:28:09 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RBtbq-0005hT-8B for control@debbugs.gnu.org; Thu, 06 Oct 2011 15:27:58 -0400 Date: Thu, 06 Oct 2011 15:27:58 -0400 Message-Id: Subject: control message for bug 6158 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.4 (------) unarchive 8279 forcemerge 8279 6158 From unknown Fri Aug 15 04:03:41 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 04 Nov 2011 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator