emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master f56fea2fcc: * lisp/reveal.el (reveal-open-new-overlays): Use `inv


From: Stefan Monnier
Subject: master f56fea2fcc: * lisp/reveal.el (reveal-open-new-overlays): Use `invisible-p`
Date: Fri, 13 Jan 2023 17:52:32 -0500 (EST)

branch: master
commit f56fea2fcc0a3fbb261628ad887a0bbee72820e3
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    * lisp/reveal.el (reveal-open-new-overlays): Use `invisible-p`
---
 lisp/reveal.el | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/lisp/reveal.el b/lisp/reveal.el
index 8a1239e1aa..5ebc5f7c6c 100644
--- a/lisp/reveal.el
+++ b/lisp/reveal.el
@@ -118,17 +118,13 @@ Each element has the form (WINDOW . OVERLAY).")
           ;; overlay.  Always reveal invisible text, but only reveal
           ;; display properties if `reveal-toggle-invisible' is
           ;; present.
-          (let ((inv (overlay-get ol 'invisible))
-                (disp (and (overlay-get ol 'display)
-                           (overlay-get ol 'reveal-toggle-invisible)))
-                open)
-            (when (and (or (and inv
-                                ;; There's an `invisible' property.
-                                ;; Make sure it's actually invisible,
-                                ;; and ellipsized.
-                                (and (consp buffer-invisibility-spec)
-                                     (cdr (assq inv 
buffer-invisibility-spec))))
-                           disp)
+          (let* ((inv (overlay-get ol 'invisible))
+                 (disp (and (overlay-get ol 'display)
+                            (overlay-get ol 'reveal-toggle-invisible)))
+                 (hidden (invisible-p inv))
+                 (ellipsis (and hidden (not (eq t hidden))))
+                 open)
+            (when (and (or ellipsis disp)
                        (or (setq open
                                  (or (overlay-get ol 'reveal-toggle-invisible)
                                      (and (symbolp inv)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]