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

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

[elpa] scratch/hyperbole 4917563d26 05/12: (kview:char-invisible-p): Sto


From: Stefan Monnier
Subject: [elpa] scratch/hyperbole 4917563d26 05/12: (kview:char-invisible-p): Stop using function
Date: Tue, 27 Jun 2023 17:38:40 -0400 (EDT)

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

    (kview:char-invisible-p): Stop using function
    
    * kotl/kview.el (kview:char-invisible-p): Mark obsolete.
    * hypb.el (hypb:insert-region): Use `invisible-p` instead.
---
 hypb.el       | 2 +-
 kotl/kview.el | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/hypb.el b/hypb.el
index d944bcc173..956ea0066f 100644
--- a/hypb.el
+++ b/hypb.el
@@ -603,7 +603,7 @@ region is copied, otherwise, it is omitted."
        (setq start (1+ start)))
     ;; Skip both hidden blank lines between cells and hidden outline text.
     (while (< start end)
-      (or (kview:char-invisible-p start) (append-to-buffer buffer start (1+ 
start)))
+      (or (invisible-p start) (append-to-buffer buffer start (1+ start)))
       (setq start (1+ start)))))
 
 (defun hypb:installation-type ()
diff --git a/kotl/kview.el b/kotl/kview.el
index 6c54f1dd1d..afa01908d9 100644
--- a/kotl/kview.el
+++ b/kotl/kview.el
@@ -638,7 +638,11 @@ level."
 ;;;###autoload
 (defun kview:char-invisible-p (&optional pos)
   "Return t if the character after point is invisible/hidden, else nil."
+  (declare (obsolete invisible-p 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))
 
 (defun kview:create (buffer-name
@@ -704,6 +708,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)))
 



reply via email to

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