diff options
| -rw-r--r-- | lisp/progmodes/hideshow.el | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index f3850c0f3d8..8efcdec36a4 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el | |||
| @@ -1378,17 +1378,18 @@ Argument E should be the event that triggered this action." | |||
| 1378 | (defun hs-indicator-mouse-toggle-hidding (event) | 1378 | (defun hs-indicator-mouse-toggle-hidding (event) |
| 1379 | "Toggle block hidding with indicators." | 1379 | "Toggle block hidding with indicators." |
| 1380 | (interactive "e") | 1380 | (interactive "e") |
| 1381 | (when hs-show-indicators | 1381 | (hs-life-goes-on |
| 1382 | (let* ((overlays (save-excursion | 1382 | (when hs-show-indicators |
| 1383 | (goto-char (posn-point (event-end event))) | 1383 | (let* ((overlays (save-excursion |
| 1384 | (overlays-in (pos-bol) (pos-eol)))) | 1384 | (goto-char (posn-point (event-end event))) |
| 1385 | (pos (catch 'hs--indicator-ov | 1385 | (overlays-in (pos-bol) (pos-eol)))) |
| 1386 | (dolist (ov overlays) | 1386 | (pos (catch 'hs--indicator-ov |
| 1387 | (when-let* ((ov (overlay-get ov 'hs-indicator-block-start))) | 1387 | (dolist (ov overlays) |
| 1388 | (throw 'hs--indicator-ov ov)))))) | 1388 | (when-let* ((ov (overlay-get ov 'hs-indicator-block-start))) |
| 1389 | (when pos | 1389 | (throw 'hs--indicator-ov ov)))))) |
| 1390 | (goto-char pos) | 1390 | (when pos |
| 1391 | (hs-toggle-hiding))))) | 1391 | (goto-char pos) |
| 1392 | (hs-toggle-hiding)))))) | ||
| 1392 | 1393 | ||
| 1393 | (defun hs-hide-initial-comment-block () | 1394 | (defun hs-hide-initial-comment-block () |
| 1394 | "Hide the first block of comments in a file. | 1395 | "Hide the first block of comments in a file. |