diff options
| -rw-r--r-- | lisp/ChangeLog | 13 | ||||
| -rw-r--r-- | lisp/textmodes/picture.el | 35 |
2 files changed, 27 insertions, 21 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 14948d41f7a..8c52d626c02 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-09-23 Peter J. Weisberg <pj@irregularexpressions.net> | ||
| 2 | |||
| 3 | * textmodes/picture.el: Make motion commands obey shift-select-mode. | ||
| 4 | (picture-newline): Use forward-line so as to ignore fields. | ||
| 5 | |||
| 1 | 2011-09-23 Stefan Monnier <monnier@iro.umontreal.ca> | 6 | 2011-09-23 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 7 | ||
| 3 | * subr.el (with-wrapper-hook): Fix edebug spec. | 8 | * subr.el (with-wrapper-hook): Fix edebug spec. |
| @@ -9,8 +14,8 @@ | |||
| 9 | 14 | ||
| 10 | 2011-09-23 Michael Albinus <michael.albinus@gmx.de> | 15 | 2011-09-23 Michael Albinus <michael.albinus@gmx.de> |
| 11 | 16 | ||
| 12 | * net/tramp-sh.el (tramp-sh-handle-file-name-all-completions): Fix | 17 | * net/tramp-sh.el (tramp-sh-handle-file-name-all-completions): |
| 13 | nasty bug using wrong cached values. | 18 | Fix nasty bug using wrong cached values. |
| 14 | 19 | ||
| 15 | 2011-09-23 Alan Mackenzie <acm@muc.de> | 20 | 2011-09-23 Alan Mackenzie <acm@muc.de> |
| 16 | 21 | ||
| @@ -75,8 +80,8 @@ | |||
| 75 | 80 | ||
| 76 | 2011-09-21 Martin Rudalics <rudalics@gmx.at> | 81 | 2011-09-21 Martin Rudalics <rudalics@gmx.at> |
| 77 | 82 | ||
| 78 | * window.el (set-window-buffer-start-and-point): Call | 83 | * window.el (set-window-buffer-start-and-point): |
| 79 | set-window-start with NOFORCE argument t. Suggested by Thierry | 84 | Call set-window-start with NOFORCE argument t. Suggested by Thierry |
| 80 | Volpiatto <thierry.volpiatto@gmail.com>. | 85 | Volpiatto <thierry.volpiatto@gmail.com>. |
| 81 | (quit-window): Reword doc-string. Handle new format of | 86 | (quit-window): Reword doc-string. Handle new format of |
| 82 | quit-restore parameter. Don't delete window if it has a | 87 | quit-restore parameter. Don't delete window if it has a |
diff --git a/lisp/textmodes/picture.el b/lisp/textmodes/picture.el index 8148378cee3..678d48758da 100644 --- a/lisp/textmodes/picture.el +++ b/lisp/textmodes/picture.el | |||
| @@ -83,7 +83,7 @@ | |||
| 83 | "Position point at the beginning of the line. | 83 | "Position point at the beginning of the line. |
| 84 | With ARG not nil, move forward ARG - 1 lines first. | 84 | With ARG not nil, move forward ARG - 1 lines first. |
| 85 | If scan reaches end of buffer, stop there without error." | 85 | If scan reaches end of buffer, stop there without error." |
| 86 | (interactive "P") | 86 | (interactive "^P") |
| 87 | (if arg (forward-line (1- (prefix-numeric-value arg)))) | 87 | (if arg (forward-line (1- (prefix-numeric-value arg)))) |
| 88 | (beginning-of-line) | 88 | (beginning-of-line) |
| 89 | (setq picture-desired-column 0)) | 89 | (setq picture-desired-column 0)) |
| @@ -92,7 +92,7 @@ If scan reaches end of buffer, stop there without error." | |||
| 92 | "Position point after last non-blank character on current line. | 92 | "Position point after last non-blank character on current line. |
| 93 | With ARG not nil, move forward ARG - 1 lines first. | 93 | With ARG not nil, move forward ARG - 1 lines first. |
| 94 | If scan reaches end of buffer, stop there without error." | 94 | If scan reaches end of buffer, stop there without error." |
| 95 | (interactive "P") | 95 | (interactive "^P") |
| 96 | (if arg (forward-line (1- (prefix-numeric-value arg)))) | 96 | (if arg (forward-line (1- (prefix-numeric-value arg)))) |
| 97 | (beginning-of-line) | 97 | (beginning-of-line) |
| 98 | (skip-chars-backward " \t" (prog1 (point) (end-of-line))) | 98 | (skip-chars-backward " \t" (prog1 (point) (end-of-line))) |
| @@ -101,7 +101,7 @@ If scan reaches end of buffer, stop there without error." | |||
| 101 | (defun picture-forward-column (arg &optional interactive) | 101 | (defun picture-forward-column (arg &optional interactive) |
| 102 | "Move cursor right, making whitespace if necessary. | 102 | "Move cursor right, making whitespace if necessary. |
| 103 | With argument, move that many columns." | 103 | With argument, move that many columns." |
| 104 | (interactive "p\nd") | 104 | (interactive "^p\nd") |
| 105 | (let (deactivate-mark) | 105 | (let (deactivate-mark) |
| 106 | (picture-update-desired-column interactive) | 106 | (picture-update-desired-column interactive) |
| 107 | (setq picture-desired-column (max 0 (+ picture-desired-column arg))) | 107 | (setq picture-desired-column (max 0 (+ picture-desired-column arg))) |
| @@ -115,14 +115,14 @@ With argument, move that many columns." | |||
| 115 | (defun picture-backward-column (arg &optional interactive) | 115 | (defun picture-backward-column (arg &optional interactive) |
| 116 | "Move cursor left, making whitespace if necessary. | 116 | "Move cursor left, making whitespace if necessary. |
| 117 | With argument, move that many columns." | 117 | With argument, move that many columns." |
| 118 | (interactive "p\nd") | 118 | (interactive "^p\nd") |
| 119 | (picture-update-desired-column interactive) | 119 | (picture-update-desired-column interactive) |
| 120 | (picture-forward-column (- arg))) | 120 | (picture-forward-column (- arg))) |
| 121 | 121 | ||
| 122 | (defun picture-move-down (arg) | 122 | (defun picture-move-down (arg) |
| 123 | "Move vertically down, making whitespace if necessary. | 123 | "Move vertically down, making whitespace if necessary. |
| 124 | With argument, move that many lines." | 124 | With argument, move that many lines." |
| 125 | (interactive "p") | 125 | (interactive "^p") |
| 126 | (let (deactivate-mark) | 126 | (let (deactivate-mark) |
| 127 | (picture-update-desired-column nil) | 127 | (picture-update-desired-column nil) |
| 128 | (picture-newline arg) | 128 | (picture-newline arg) |
| @@ -139,7 +139,7 @@ With argument, move that many lines." | |||
| 139 | (defun picture-move-up (arg) | 139 | (defun picture-move-up (arg) |
| 140 | "Move vertically up, making whitespace if necessary. | 140 | "Move vertically up, making whitespace if necessary. |
| 141 | With argument, move that many lines." | 141 | With argument, move that many lines." |
| 142 | (interactive "p") | 142 | (interactive "^p") |
| 143 | (picture-update-desired-column nil) | 143 | (picture-update-desired-column nil) |
| 144 | (picture-move-down (- arg))) | 144 | (picture-move-down (- arg))) |
| 145 | 145 | ||
| @@ -212,7 +212,7 @@ The mode line is updated to reflect the current direction." | |||
| 212 | With ARG do it that many times. Useful for delineating rectangles in | 212 | With ARG do it that many times. Useful for delineating rectangles in |
| 213 | conjunction with diagonal picture motion. | 213 | conjunction with diagonal picture motion. |
| 214 | Do \\[command-apropos] picture-movement to see commands which control motion." | 214 | Do \\[command-apropos] picture-movement to see commands which control motion." |
| 215 | (interactive "p") | 215 | (interactive "^p") |
| 216 | (picture-move-down (* arg picture-vertical-step)) | 216 | (picture-move-down (* arg picture-vertical-step)) |
| 217 | (picture-forward-column (* arg picture-horizontal-step))) | 217 | (picture-forward-column (* arg picture-horizontal-step))) |
| 218 | 218 | ||
| @@ -221,7 +221,7 @@ Do \\[command-apropos] picture-movement to see commands which control motion." | |||
| 221 | With ARG do it that many times. Useful for delineating rectangles in | 221 | With ARG do it that many times. Useful for delineating rectangles in |
| 222 | conjunction with diagonal picture motion. | 222 | conjunction with diagonal picture motion. |
| 223 | Do \\[command-apropos] picture-movement to see commands which control motion." | 223 | Do \\[command-apropos] picture-movement to see commands which control motion." |
| 224 | (interactive "p") | 224 | (interactive "^p") |
| 225 | (picture-motion (- arg))) | 225 | (picture-motion (- arg))) |
| 226 | 226 | ||
| 227 | (defun picture-mouse-set-point (event) | 227 | (defun picture-mouse-set-point (event) |
| @@ -323,13 +323,14 @@ many lines." | |||
| 323 | "Move to the beginning of the following line. | 323 | "Move to the beginning of the following line. |
| 324 | With argument, moves that many lines (up, if negative argument); | 324 | With argument, moves that many lines (up, if negative argument); |
| 325 | always moves to the beginning of a line." | 325 | always moves to the beginning of a line." |
| 326 | (interactive "p") | 326 | (interactive "^p") |
| 327 | (if (< arg 0) | 327 | (let ((start (point)) |
| 328 | (forward-line arg) | 328 | (lines-left (forward-line arg))) |
| 329 | (while (> arg 0) | 329 | (if (and (eobp) |
| 330 | (end-of-line) | 330 | (> (point) start)) |
| 331 | (if (eobp) (newline) (forward-char 1)) | 331 | (newline)) |
| 332 | (setq arg (1- arg))))) | 332 | (if (> lines-left 0) |
| 333 | (newline lines-left)))) | ||
| 333 | 334 | ||
| 334 | (defun picture-open-line (arg) | 335 | (defun picture-open-line (arg) |
| 335 | "Insert an empty line after the current line. | 336 | "Insert an empty line after the current line. |
| @@ -438,7 +439,7 @@ With ARG move to column occupied by next interesting character in this | |||
| 438 | line. The character must be preceded by whitespace. | 439 | line. The character must be preceded by whitespace. |
| 439 | \"interesting characters\" are defined by variable `picture-tab-chars'. | 440 | \"interesting characters\" are defined by variable `picture-tab-chars'. |
| 440 | If no such character is found, move to beginning of line." | 441 | If no such character is found, move to beginning of line." |
| 441 | (interactive "P") | 442 | (interactive "^P") |
| 442 | (let ((target (current-column))) | 443 | (let ((target (current-column))) |
| 443 | (save-excursion | 444 | (save-excursion |
| 444 | (if (and (not arg) | 445 | (if (and (not arg) |
| @@ -464,7 +465,7 @@ If no such character is found, move to beginning of line." | |||
| 464 | With prefix arg, overwrite the traversed text with spaces. The tab stop | 465 | With prefix arg, overwrite the traversed text with spaces. The tab stop |
| 465 | list can be changed by \\[picture-set-tab-stops] and \\[edit-tab-stops]. | 466 | list can be changed by \\[picture-set-tab-stops] and \\[edit-tab-stops]. |
| 466 | See also documentation for variable `picture-tab-chars'." | 467 | See also documentation for variable `picture-tab-chars'." |
| 467 | (interactive "P") | 468 | (interactive "^P") |
| 468 | (let* ((opoint (point))) | 469 | (let* ((opoint (point))) |
| 469 | (move-to-tab-stop) | 470 | (move-to-tab-stop) |
| 470 | (if arg | 471 | (if arg |