Bug 595546 - emacs: hideshow library matches wrong parenthesis under certain circumstances
emacs: hideshow library matches wrong parenthesis under certain circumstances
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: emacs (Show other bugs)
12
All All
low Severity low
: ---
: ---
Assigned To: Karel Klíč
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-24 18:31 EDT by erazortt
Modified: 2013-03-03 18:01 EST (History)
3 users (show)

See Also:
Fixed In Version: emacs-23.2-4.fc13
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-08-17 01:30:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description erazortt 2010-05-24 18:31:11 EDT
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 11:47:42 EDT
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 11:49:18 EDT
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 19:33:54 EDT
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 01:30:10 EDT
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 01:42:31 EDT
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.