Commit e6dad5c5 authored by Troels Henriksen's avatar Troels Henriksen

Catch buffer motion conditions in `forward-one-line' and

`backward-one-line'.
parent 986fed5e
......@@ -290,10 +290,11 @@ Return T if successful, or NIL if the buffer limit was reached."))
(defmethod forward-one-line (mark syntax)
(let ((column (column-number mark)))
(end-of-line mark)
(cond ((forward-object mark)
(setf (column-number mark) column)
t)
(t nil))))
(handler-case (cond ((forward-object mark)
(setf (column-number mark) column)
t)
(t nil))
(motion-after-end ()))))
(defgeneric backward-one-line (mark syntax)
(:documentation
......@@ -303,10 +304,11 @@ Return T if successful, or NIL if the buffer limit was reached."))
(defmethod backward-one-line (mark syntax)
(let ((column (column-number mark)))
(beginning-of-line mark)
(cond ((backward-object mark)
(setf (column-number mark) column)
t)
(t nil))))
(handler-case (cond ((backward-object mark)
(setf (column-number mark) column)
t)
(t nil))
(motion-before-beginning ()))))
(define-motion-fns line)
......
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