Mercurial > emacs
comparison lisp/textmodes/picture.el @ 46103:4bea2ef4c58a
(picture-forward-column)
(picture-move-down): Never deactivate the mark.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 01 Jul 2002 07:47:22 +0000 |
parents | 55003e5c6707 |
children | fc643b6ab4f4 |
comparison
equal
deleted
inserted
replaced
46102:3a5c7022ed2f | 46103:4bea2ef4c58a |
---|---|
102 | 102 |
103 (defun picture-forward-column (arg &optional interactive) | 103 (defun picture-forward-column (arg &optional interactive) |
104 "Move cursor right, making whitespace if necessary. | 104 "Move cursor right, making whitespace if necessary. |
105 With argument, move that many columns." | 105 With argument, move that many columns." |
106 (interactive "p\nd") | 106 (interactive "p\nd") |
107 (picture-update-desired-column interactive) | 107 (let (deactivate-mark) |
108 (setq picture-desired-column (max 0 (+ picture-desired-column arg))) | 108 (picture-update-desired-column interactive) |
109 (let ((current-column (move-to-column picture-desired-column t))) | 109 (setq picture-desired-column (max 0 (+ picture-desired-column arg))) |
110 (if (and (> current-column picture-desired-column) | 110 (let ((current-column (move-to-column picture-desired-column t))) |
111 (< arg 0)) | 111 (if (and (> current-column picture-desired-column) |
112 ;; It seems that we have just tried to move to the right | 112 (< arg 0)) |
113 ;; column of a multi-column character. | 113 ;; It seems that we have just tried to move to the right |
114 (forward-char -1)))) | 114 ;; column of a multi-column character. |
115 (forward-char -1))))) | |
115 | 116 |
116 (defun picture-backward-column (arg &optional interactive) | 117 (defun picture-backward-column (arg &optional interactive) |
117 "Move cursor left, making whitespace if necessary. | 118 "Move cursor left, making whitespace if necessary. |
118 With argument, move that many columns." | 119 With argument, move that many columns." |
119 (interactive "p\nd") | 120 (interactive "p\nd") |
122 | 123 |
123 (defun picture-move-down (arg) | 124 (defun picture-move-down (arg) |
124 "Move vertically down, making whitespace if necessary. | 125 "Move vertically down, making whitespace if necessary. |
125 With argument, move that many lines." | 126 With argument, move that many lines." |
126 (interactive "p") | 127 (interactive "p") |
127 (picture-update-desired-column nil) | 128 (let (deactivate-mark) |
128 (picture-newline arg) | 129 (picture-update-desired-column nil) |
129 (let ((current-column (move-to-column picture-desired-column t))) | 130 (picture-newline arg) |
130 (if (> current-column picture-desired-column) | 131 (let ((current-column (move-to-column picture-desired-column t))) |
131 (forward-char -1)))) | 132 (if (> current-column picture-desired-column) |
133 (forward-char -1))))) | |
132 | 134 |
133 (defvar picture-vertical-step 0 | 135 (defvar picture-vertical-step 0 |
134 "Amount to move vertically after text character in Picture mode.") | 136 "Amount to move vertically after text character in Picture mode.") |
135 | 137 |
136 (defvar picture-horizontal-step 1 | 138 (defvar picture-horizontal-step 1 |