diff options
author | Karl Heuer <kwzh@gnu.org> | 1994-03-01 06:19:22 +0000 |
---|---|---|
committer | Karl Heuer <kwzh@gnu.org> | 1994-03-01 06:19:22 +0000 |
commit | ad8fb8aec74d7361695f84e89d6ffce47f480bf1 (patch) | |
tree | 8b7c78b4e6ca6d44984885b3ad44ff9e38d5110a /lisp/textmodes/picture.el | |
parent | 54a003f758c6d514051aebc67249fe7a224620cd (diff) | |
download | emacs-ad8fb8aec74d7361695f84e89d6ffce47f480bf1.tar.gz emacs-ad8fb8aec74d7361695f84e89d6ffce47f480bf1.tar.bz2 emacs-ad8fb8aec74d7361695f84e89d6ffce47f480bf1.zip |
(picture-forward-column, picture-backward-column): Allow backward motion
across multi-column characters.
Diffstat (limited to 'lisp/textmodes/picture.el')
-rw-r--r-- | lisp/textmodes/picture.el | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/textmodes/picture.el b/lisp/textmodes/picture.el index 878161da481..72c7125593d 100644 --- a/lisp/textmodes/picture.el +++ b/lisp/textmodes/picture.el @@ -76,13 +76,19 @@ If scan reaches end of buffer, stop there without error." "Move cursor right, making whitespace if necessary. With argument, move that many columns." (interactive "p") - (move-to-column-force (+ (current-column) arg))) + (let ((target-column (+ (current-column) arg))) + (move-to-column-force target-column) + ;; Picture mode isn't really suited to multi-column characters, + ;; but we might as well let the user move across them. + (and (< arg 0) + (> (current-column) target-column) + (forward-char -1)))) (defun picture-backward-column (arg) "Move cursor left, making whitespace if necessary. With argument, move that many columns." (interactive "p") - (move-to-column-force (- (current-column) arg))) + (picture-forward-column (- arg))) (defun picture-move-down (arg) "Move vertically down, making whitespace if necessary. |