Sync with apel-10_3-1.
[elisp/lemi.git] / poe / inv-19.el
index 287a007..d96df39 100644 (file)
@@ -1,6 +1,6 @@
 ;;; inv-19.el --- invisible feature implementation for Emacs 19 or later
 
-;; Copyright (C) 1995,1996,1997,1998 Free Software Foundation, Inc.
+;; Copyright (C) 1995,1996,1997,1998,1999,2001 Free Software Foundation, Inc.
 
 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;; Keywords: invisible, text-property, region, Emacs 19
   (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