[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/hideshowvis 7b174241c9 15/20: fix: Check hideshowvis-ignor
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/hideshowvis 7b174241c9 15/20: fix: Check hideshowvis-ignore-same-line before making overlay. |
Date: |
Sat, 15 Jun 2024 10:00:29 -0400 (EDT) |
branch: elpa/hideshowvis
commit 7b174241c9381afb0d55c8bdc52b727323ce76bc
Author: eyal0 <109809+eyal0@users.noreply.github.com>
Commit: Jan R <nospam@sheijk.net>
fix: Check hideshowvis-ignore-same-line before making overlay.
This fixes #11.
---
hideshowvis.el | 32 +++++++++++++++-----------------
1 file changed, 15 insertions(+), 17 deletions(-)
diff --git a/hideshowvis.el b/hideshowvis.el
index d0669dce74..2b2fe80386 100644
--- a/hideshowvis.el
+++ b/hideshowvis.el
@@ -140,23 +140,21 @@ functions used with `after-change-functions'."
(goto-char (point-min))
(remove-overlays (point-min) (point-max) 'hideshowvis-hs t)
(while (search-forward-regexp hs-block-start-regexp nil t)
- (let* ((ovl (make-overlay (match-beginning 0) (match-end 0)))
- (marker-string "*hideshowvis*")
- (doit
- (if hideshowvis-ignore-same-line
- (let (begin-line)
- (setq begin-line
- (save-excursion
- (goto-char (match-beginning 0))
- (line-number-at-pos (point))))
- (save-excursion
- (goto-char (match-beginning 0))
- (ignore-errors
- (progn
- (funcall hs-forward-sexp-func 1)
- (> (line-number-at-pos (point)) begin-line)))))
- t)))
- (when doit
+ (when (if hideshowvis-ignore-same-line
+ (let (begin-line)
+ (setq begin-line
+ (save-excursion
+ (goto-char (match-beginning 0))
+ (line-number-at-pos (point))))
+ (save-excursion
+ (goto-char (match-beginning 0))
+ (ignore-errors
+ (progn
+ (funcall hs-forward-sexp-func 1)
+ (> (line-number-at-pos (point)) begin-line)))))
+ t)
+ (let* ((ovl (make-overlay (match-beginning 0) (match-end 0)))
+ (marker-string "*hideshowvis*"))
(put-text-property 0
(length marker-string)
'display
- [nongnu] branch elpa/hideshowvis created (now 3a605b78d8), ELPA Syncer, 2024/06/15
- [nongnu] elpa/hideshowvis 7cb98a4455 02/20: v0.1, ELPA Syncer, 2024/06/15
- [nongnu] elpa/hideshowvis 5e5ab24a35 03/20: v0.2, ELPA Syncer, 2024/06/15
- [nongnu] elpa/hideshowvis 6dee54598e 01/20: Initial commit, ELPA Syncer, 2024/06/15
- [nongnu] elpa/hideshowvis 7d5a6e259d 04/20: v0.3, ELPA Syncer, 2024/06/15
- [nongnu] elpa/hideshowvis 51c9fcd8ff 05/20: v0.4, ELPA Syncer, 2024/06/15
- [nongnu] elpa/hideshowvis 2474bb3175 07/20: v0.6, ELPA Syncer, 2024/06/15
- [nongnu] elpa/hideshowvis 3a5cd08c4f 10/20: Fixed version constant., ELPA Syncer, 2024/06/15
- [nongnu] elpa/hideshowvis c2ab91bd77 18/20: Fix interaction with auto-revert-mode., ELPA Syncer, 2024/06/15
- [nongnu] elpa/hideshowvis 7b174241c9 15/20: fix: Check hideshowvis-ignore-same-line before making overlay.,
ELPA Syncer <=
- [nongnu] elpa/hideshowvis 136d94e8f1 08/20: Updated readme, ELPA Syncer, 2024/06/15
- [nongnu] elpa/hideshowvis 3a605b78d8 20/20: Applied code review comments by Philip Kaludercic, ELPA Syncer, 2024/06/15
- [nongnu] elpa/hideshowvis 234cd37e00 06/20: v0.5, ELPA Syncer, 2024/06/15
- [nongnu] elpa/hideshowvis 064b6bb1b5 09/20: Updated readme and doc., ELPA Syncer, 2024/06/15
- [nongnu] elpa/hideshowvis e313c9ea78 11/20: v0.7, ELPA Syncer, 2024/06/15
- [nongnu] elpa/hideshowvis 614e856620 12/20: Update copyright and mail, ELPA Syncer, 2024/06/15
- [nongnu] elpa/hideshowvis e48500ef9f 14/20: Fix interaction with indent-region, ELPA Syncer, 2024/06/15
- [nongnu] elpa/hideshowvis 9ae59d8576 16/20: Update contributors list, ELPA Syncer, 2024/06/15
- [nongnu] elpa/hideshowvis 33e693dc60 19/20: Add docstrings and fix warnings, add v0.8 release notes, ELPA Syncer, 2024/06/15
- [nongnu] elpa/hideshowvis 8570f58ed3 13/20: Whitespace fix, ELPA Syncer, 2024/06/15