Mercurial > emacs
changeset 85404:a72f314c5cd8
(artist-previous-line, artist-next-line): Use forward-line.
author | Thien-Thi Nguyen <ttn@gnuvola.org> |
---|---|
date | Thu, 18 Oct 2007 15:55:56 +0000 |
parents | 988c305fd2e0 |
children | d9e1a202593d |
files | lisp/textmodes/artist.el |
diffstat | 1 files changed, 8 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/textmodes/artist.el Thu Oct 18 13:29:30 2007 +0000 +++ b/lisp/textmodes/artist.el Thu Oct 18 15:55:56 2007 +0000 @@ -4383,13 +4383,10 @@ If N is negative, move cursor down." (interactive "p") (let ((col (artist-current-column))) - (if (not artist-key-is-drawing) - (progn - (previous-line n) - (move-to-column col t)) - (previous-line n) - (move-to-column col t) - (artist-key-do-continously-common)))) + (forward-line (- n)) + (move-to-column col t)) + (when artist-key-is-drawing + (artist-key-do-continously-common))) (defun artist-next-line (&optional n) @@ -4397,13 +4394,10 @@ If N is negative, move cursor up." (interactive "p") (let ((col (artist-current-column))) - (if (not artist-key-is-drawing) - (progn - (next-line n) - (move-to-column col t)) - (next-line n) - (move-to-column col t) - (artist-key-do-continously-common)))) + (forward-line n) + (move-to-column col t)) + (when artist-key-is-drawing + (artist-key-do-continously-common))) (defun artist-backward-char (&optional n) "Move cursor backward optional N chars (default is 1), updating curr shape.