bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#10855: 24.0.93; hideshow does not hide comment with cursor in first


From: John Yates
Subject: bug#10855: 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]