Fix progression in hideshow.el

* lisp/progmodes/hideshow.el (hs-hide-all): Ensure progression in
a less brittle fashion (bug#19892).
This commit is contained in:
Lars Ingebrigtsen 2019-08-02 21:21:23 +02:00
parent 0393cd2f72
commit 1b82cc0105

View 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))