# HG changeset patch # User Karl Heuer # Date 762502762 0 # Node ID 121ee28dbda066d71a7b9a89a63d72719b0052d0 # Parent 9e150a376c326d853b9c8c3bdb23df5f57cf5ed4 (picture-forward-column, picture-backward-column): Allow backward motion across multi-column characters. diff -r 9e150a376c32 -r 121ee28dbda0 lisp/textmodes/picture.el --- a/lisp/textmodes/picture.el Tue Mar 01 04:54:43 1994 +0000 +++ b/lisp/textmodes/picture.el Tue Mar 01 06:19:22 1994 +0000 @@ -76,13 +76,19 @@ "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.