]> git.eshelyaron.com Git - emacs.git/commitdiff
(line-move): Cope if next-single-property-change
authorRichard M. Stallman <rms@gnu.org>
Mon, 10 Dec 2001 20:38:47 +0000 (20:38 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 10 Dec 2001 20:38:47 +0000 (20:38 +0000)
or previous-single-property-change returns nil.

lisp/simple.el

index 74821ae31169fbd972edbeecc5963836a4b7f0c7..cc358ae0edcd4904d2fc36dea7534c1ddcb934e4 100644 (file)
@@ -2543,7 +2543,8 @@ Outline mode sets this."
                              (or (memq prop buffer-invisibility-spec)
                                  (assq prop buffer-invisibility-spec)))))
                (if (get-text-property (point) 'invisible)
-                   (goto-char (next-single-property-change (point) 'invisible))
+                   (goto-char (or (next-single-property-change (point) 'invisible)
+                                  (point-max)))
                  (goto-char (next-overlay-change (point)))))
              (setq arg (1- arg)))
            (while (< arg 0)
@@ -2558,7 +2559,8 @@ Outline mode sets this."
                              (or (memq prop buffer-invisibility-spec)
                                  (assq prop buffer-invisibility-spec)))))
                (if (get-text-property (1- (point)) 'invisible)
-                   (goto-char (previous-single-property-change (point) 'invisible))
+                   (goto-char (or (previous-single-property-change (point) 'invisible)
+                                  (point-min)))
                  (goto-char (previous-overlay-change (point)))))
              (setq arg (1+ arg))))
          (let ((buffer-invisibility-spec nil))