From: Lars Ingebrigtsen Date: Fri, 2 Aug 2019 19:21:23 +0000 (+0200) Subject: Fix progression in hideshow.el X-Git-Tag: emacs-27.0.90~1747 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1b82cc0105994e638766ba864654add6935fa508;p=emacs.git Fix progression in hideshow.el * lisp/progmodes/hideshow.el (hs-hide-all): Ensure progression in a less brittle fashion (bug#19892). --- diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index 4cfcd3d09a3..0fb5c555125 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el @@ -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))