]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix progression in hideshow.el
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 2 Aug 2019 19:21:23 +0000 (21:21 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 2 Aug 2019 19:21:23 +0000 (21:21 +0200)
* lisp/progmodes/hideshow.el (hs-hide-all): Ensure progression in
a less brittle fashion (bug#19892).

lisp/progmodes/hideshow.el

index 4cfcd3d09a3233a18c14a304cfb8c3bf66f1ec8c..0fb5c5551255fc313a5419d9a563e571aefd5b95 100644 (file)
@@ -806,7 +806,8 @@ If `hs-hide-comments-when-hiding-all' is non-nil, also hide the comments."
                         (hs-hide-block-at-point t))
                 ;; Go to end of matched data to prevent from getting stuck
                 ;; with an endless loop.
-                (goto-char (match-end 0))))
+                 (when (looking-at hs-block-start-regexp)
+                  (goto-char (match-end 0)))))
            ;; found a comment, probably
            (let ((c-reg (hs-inside-comment-p)))
              (when (and c-reg (car c-reg))