aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/simple.el
diff options
context:
space:
mode:
authorRichard M. Stallman1997-08-12 23:18:41 +0000
committerRichard M. Stallman1997-08-12 23:18:41 +0000
commitd91462ce17bc0f747ab77a67aa496ce970fe707f (patch)
tree3815728534fd89b7f3bb48a03d1bf9b35f86267d /lisp/simple.el
parent6f187d8d8a997e5b3d238a16e2f17ba3521d882c (diff)
downloademacs-d91462ce17bc0f747ab77a67aa496ce970fe707f.tar.gz
emacs-d91462ce17bc0f747ab77a67aa496ce970fe707f.zip
(forward-visible-line): Handle nil value from
next-single-property-change or previous-single-property-change.
Diffstat (limited to 'lisp/simple.el')
-rw-r--r--lisp/simple.el16
1 files changed, 10 insertions, 6 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index a00368e47a5..a676353fa56 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1202,9 +1202,11 @@ If ARG is zero, move to the beginning of the current line."
1202 prop 1202 prop
1203 (or (memq prop buffer-invisibility-spec) 1203 (or (memq prop buffer-invisibility-spec)
1204 (assq prop buffer-invisibility-spec))))) 1204 (assq prop buffer-invisibility-spec)))))
1205 (if (get-text-property (point) 'invisible) 1205 (goto-char
1206 (goto-char (next-single-property-change (point) 'invisible)) 1206 (if (get-text-property (point) 'invisible)
1207 (goto-char (next-overlay-change (point)))) 1207 (or (next-single-property-change (point) 'invisible)
1208 (point-max))
1209 (next-overlay-change (point))))
1208 (or (zerop (forward-line 1)) 1210 (or (zerop (forward-line 1))
1209 (signal 'end-of-buffer nil))) 1211 (signal 'end-of-buffer nil)))
1210 (setq arg (1- arg))) 1212 (setq arg (1- arg)))
@@ -1221,9 +1223,11 @@ If ARG is zero, move to the beginning of the current line."
1221 prop 1223 prop
1222 (or (memq prop buffer-invisibility-spec) 1224 (or (memq prop buffer-invisibility-spec)
1223 (assq prop buffer-invisibility-spec))))) 1225 (assq prop buffer-invisibility-spec)))))
1224 (if (get-text-property (1- (point)) 'invisible) 1226 (goto-char
1225 (goto-char (previous-single-property-change (point) 'invisible)) 1227 (if (get-text-property (1- (point)) 'invisible)
1226 (goto-char (previous-overlay-change (point)))) 1228 (or (previous-single-property-change (point) 'invisible)
1229 (point-min))
1230 (previous-overlay-change (point))))
1227 (or (zerop (forward-line -1)) 1231 (or (zerop (forward-line -1))
1228 (signal 'beginning-of-buffer nil))) 1232 (signal 'beginning-of-buffer nil)))
1229 (setq first nil) 1233 (setq first nil)