emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] scratch/hyperbole 63e463172e 06/16: (kview:char-visible-p): Delet


From: Stefan Monnier
Subject: [elpa] scratch/hyperbole 63e463172e 06/16: (kview:char-visible-p): Delete function
Date: Mon, 19 Jun 2023 22:36:44 -0400 (EDT)

branch: scratch/hyperbole
commit 63e463172e14f8db81f08d48ee76963392457fe9
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    (kview:char-visible-p): Delete function
    
    * kotl/kview.el (kview:first-invisible-point): Use `kview:char-invisible-p`.
    (kview:char-visible-p): Delete function.
---
 kotl/kview.el | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/kotl/kview.el b/kotl/kview.el
index 3e0de9ed65..6a6338284d 100644
--- a/kotl/kview.el
+++ b/kotl/kview.el
@@ -638,14 +638,12 @@ level."
 ;;;###autoload
 (defun kview:char-invisible-p (&optional pos)
   "Return t if the character after point is invisible/hidden, else nil."
+  ;; FIXME: Why not (invisible-p (or pos (point))) ?
   (when (get-char-property (or pos (point)) 'invisible)
+    ;; FIXME: To be invisible, a non-nil property value is not
+    ;; sufficient: it also depends on `buffer-invisibility-spec'.
     t))
 
-;;;###autoload
-(defun kview:char-visible-p (&optional pos)
-  "Return t if the character after point is visible, else nil."
-  (not (get-char-property (or pos (point)) 'invisible)))
-
 (defun kview:create (buffer-name
                         &optional id-counter top-cell-attributes
                         label-type level-indent label-separator
@@ -709,6 +707,8 @@ are used.
 
 (defun kview:end-of-actual-line ()
   "Go to the end of the current line whether collapsed or not."
+  ;; FIXME: This "[\n\r]" is a leftover from when kotl was using
+  ;; `selective-display'.  We should use `end-of-line' nowadays.
   (when (re-search-forward "[\n\r]" nil 'move)
     (backward-char 1)))
 
@@ -745,7 +745,7 @@ Value may be the character immediately after point."
   (unless pos
     (setq pos (point)))
   (let ((end (kcell-view:end-contents pos)))
-    (while (and pos (< pos end) (kview:char-visible-p pos))
+    (while (and pos (< pos end) (not (kview:char-invisible-p pos)))
       (if (kproperty:get pos 'invisible)
          (setq pos (kproperty:next-single-change pos 'invisible nil end))
        (let ((overlay (car (delq nil (mapcar (lambda (o) (when (overlay-get o 
'invisible) o))



reply via email to

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