]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/reveal.el (reveal-open-new-overlays): Use `invisible-p`
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 13 Jan 2023 22:52:23 +0000 (17:52 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 13 Jan 2023 22:52:23 +0000 (17:52 -0500)
lisp/reveal.el

index 8a1239e1aa2404261377af051eba8cabaedf73c2..5ebc5f7c6c34c4dfa67e5235f92e21aeebabe7ef 100644 (file)
@@ -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)