* inv-19.el (next-visible-point): Return the value of `point-max' when
[elisp/apel.git] / inv-19.el
index 11074bf..a05cc71 100644 (file)
--- a/inv-19.el
+++ b/inv-19.el
   (get-text-property pos 'invisible))
 
 (defun next-visible-point (pos)
-  (save-excursion
-    (goto-char (next-single-property-change pos 'invisible))
-    (if (eq (following-char) ?\n)
-       (forward-char))
-    (point)))
+  (if (setq pos (next-single-property-change pos 'invisible))
+      (if (eq ?\n (char-after pos))
+         (1+ pos)
+       pos)
+    (point-max)))
 
 
 ;;; @ end