Bug 595546 - emacs: hideshow library matches wrong parenthesis under certain circumstances
Summary: emacs: hideshow library matches wrong parenthesis under certain circumstances
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: emacs
Version: 12
Hardware: All
OS: All
low
low
Target Milestone: ---
Assignee: Karel Klíč
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-24 22:31 UTC by erazortt
Modified: 2013-03-03 23:01 UTC (History)
3 users (show)

Fixed In Version: emacs-23.2-4.fc13
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-08-17 05:30:25 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
patch to solve the described problem in the hideshow package (783 bytes, patch)
2010-05-24 22:31 UTC, erazortt
no flags Details | Diff

Description erazortt 2010-05-24 22:31:11 UTC
Created attachment 416235 [details]
patch to solve the described problem in the hideshow package

Description of problem:
Try to use the hideshow package to hide the following c++ function:

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;
  //}
}

The hideshow package does not take into account that the opening parenthesis is commented out: "//if(x!=32){"
Thus it will hide the function according to this parenthesis.

Version-Release number of selected component (if applicable):
All emacs versions (23.2, 23.1 and older)

How reproducible:
always

Steps to Reproduce:
1. load hideshow in .emacs: (require 'hideshow)
2. add c++ hook in .emacs: (add-hook 'c-mode-common-hook   'hs-minor-mode)
3. try to hide the shown c++ code (i.e. by C-c @ C-c)
  
Actual results:
inline int round_to_next_power2(register unsigned int x){
//if(x!=32){... }

Expected results:
inline int round_to_next_power2(register unsigned int x){... }

Additional info:
The problem can be solved by the attached patch

Comment 1 Fedora Update System 2010-08-03 15:47:42 UTC
emacs-23.2-4.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/emacs-23.2-4.fc13

Comment 2 Fedora Update System 2010-08-03 15:49:18 UTC
emacs-23.1-24.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/emacs-23.1-24.fc12

Comment 3 Fedora Update System 2010-08-05 23:33:54 UTC
emacs-23.2-4.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update emacs'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/emacs-23.2-4.fc13

Comment 4 Fedora Update System 2010-08-17 05:30:10 UTC
emacs-23.2-4.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 5 Fedora Update System 2010-08-17 05:42:31 UTC
emacs-23.1-24.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.