GNU bug report logs - #10855
24.0.93; hideshow does not hide comment with cursor in first line's indentation

Previous Next

Package: emacs;

Reported by: John Yates <john <at> yates-sheets.org>

Date: Mon, 20 Feb 2012 13:47:02 UTC

Severity: normal

Found in version 24.0.93

Done: Chong Yidong <cyd <at> gnu.org>

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 10855 in the body.
You can then email your comments to 10855 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 bug-gnu-emacs <at> gnu.org:
bug#10855; Package emacs. (Mon, 20 Feb 2012 13:47:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to John Yates <john <at> yates-sheets.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 20 Feb 2012 13:47:02 GMT) Full text and rfc822 format available.

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

From: John Yates <john <at> yates-sheets.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.93; hideshow does not hide comment with cursor in first line's
	indentation
Date: Mon, 20 Feb 2012 08:44:15 -0500
hs-show-block will reveal a collapsed comment block when the cursor is
in that block's indentation.  hs-hide-block will collapse a comment
block when the cursor is in the indentation of any line other than the
first.  hs-hide-block will _not_ collapse a comment block if the
cursor is within the _first_ line's indentation.

The following one line patch corrects this slight asymetry:

--- cur/hideshow.el
+++ fix/hideshow.el
@@ -607,6 +609,7 @@
    ;; forward comment, and see if we are inside, then extend
    ;; forward and backward as long as we have comments
    (let ((q (point)))
+      (skip-chars-forward "[:blank:]")
      (when (or (looking-at hs-c-start-regexp)
                (re-search-backward hs-c-start-regexp (point-min) t))
        ;; first get to the beginning of this comment...

/john




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10855; Package emacs. (Wed, 21 Mar 2012 17:34:01 GMT) Full text and rfc822 format available.

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

From: Chong Yidong <cyd <at> gnu.org>
To: John Yates <john <at> yates-sheets.org>
Cc: 10855 <at> debbugs.gnu.org
Subject: Re: bug#10855: 24.0.93;
	hideshow does not hide comment with cursor in first line's indentation
Date: Thu, 22 Mar 2012 01:02:20 +0800
John Yates <john <at> yates-sheets.org> writes:

> hs-show-block will reveal a collapsed comment block when the cursor is
> in that block's indentation.  hs-hide-block will collapse a comment
> block when the cursor is in the indentation of any line other than the
> first.  hs-hide-block will _not_ collapse a comment block if the
> cursor is within the _first_ line's indentation.
>
> The following one line patch corrects this slight asymetry

Committed, thanks.





bug closed, send any further explanations to 10855 <at> debbugs.gnu.org and John Yates <john <at> yates-sheets.org> Request was from Chong Yidong <cyd <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 21 Mar 2012 17:34:02 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. (Thu, 19 Apr 2012 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 20 days ago.

Previous Next


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