diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2019-08-02 21:21:23 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2019-08-02 21:21:23 +0200 |
commit | 1b82cc0105994e638766ba864654add6935fa508 (patch) | |
tree | 83e19ff2399e9674598165f3f9be55c1f9fe2b94 /lisp | |
parent | 0393cd2f721f8e44b4cef3b0864f1b4903ab9ba3 (diff) | |
download | emacs-1b82cc0105994e638766ba864654add6935fa508.tar.gz |
Fix progression in hideshow.el
* lisp/progmodes/hideshow.el (hs-hide-all): Ensure progression in
a less brittle fashion (bug#19892).
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/progmodes/hideshow.el | 3 |
1 files changed, 2 insertions, 1 deletions
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)) |