Commit d91462ce authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(forward-visible-line): Handle nil value from

next-single-property-change or previous-single-property-change.
parent 6f187d8d
...@@ -1202,9 +1202,11 @@ If ARG is zero, move to the beginning of the current line." ...@@ -1202,9 +1202,11 @@ If ARG is zero, move to the beginning of the current line."
prop prop
(or (memq prop buffer-invisibility-spec) (or (memq prop buffer-invisibility-spec)
(assq prop buffer-invisibility-spec))))) (assq prop buffer-invisibility-spec)))))
(if (get-text-property (point) 'invisible) (goto-char
(goto-char (next-single-property-change (point) 'invisible)) (if (get-text-property (point) 'invisible)
(goto-char (next-overlay-change (point)))) (or (next-single-property-change (point) 'invisible)
(point-max))
(next-overlay-change (point))))
(or (zerop (forward-line 1)) (or (zerop (forward-line 1))
(signal 'end-of-buffer nil))) (signal 'end-of-buffer nil)))
(setq arg (1- arg))) (setq arg (1- arg)))
...@@ -1221,9 +1223,11 @@ If ARG is zero, move to the beginning of the current line." ...@@ -1221,9 +1223,11 @@ If ARG is zero, move to the beginning of the current line."
prop prop
(or (memq prop buffer-invisibility-spec) (or (memq prop buffer-invisibility-spec)
(assq prop buffer-invisibility-spec))))) (assq prop buffer-invisibility-spec)))))
(if (get-text-property (1- (point)) 'invisible) (goto-char
(goto-char (previous-single-property-change (point) 'invisible)) (if (get-text-property (1- (point)) 'invisible)
(goto-char (previous-overlay-change (point)))) (or (previous-single-property-change (point) 'invisible)
(point-min))
(previous-overlay-change (point))))
(or (zerop (forward-line -1)) (or (zerop (forward-line -1))
(signal 'beginning-of-buffer nil))) (signal 'beginning-of-buffer nil)))
(setq first nil) (setq first nil)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment