diff options
| author | Richard M. Stallman | 1998-07-29 22:44:56 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-07-29 22:44:56 +0000 |
| commit | 79b65a085d5ac8928bfc0e9f1f5a8c4025630496 (patch) | |
| tree | e56f4cf223c84e1880cbf30cccccb1f473705675 | |
| parent | 929a672696371bab8159160dedfcc930cba1d3ee (diff) | |
| download | emacs-79b65a085d5ac8928bfc0e9f1f5a8c4025630496.tar.gz emacs-79b65a085d5ac8928bfc0e9f1f5a8c4025630496.zip | |
(crisp-mark-line): Greatly simplified.
| -rw-r--r-- | lisp/emulation/crisp.el | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/lisp/emulation/crisp.el b/lisp/emulation/crisp.el index 4f7d9766745..6f3071f2035 100644 --- a/lisp/emulation/crisp.el +++ b/lisp/emulation/crisp.el | |||
| @@ -270,19 +270,13 @@ If ARG, insert results at point." | |||
| 270 | (message foo)))) | 270 | (message foo)))) |
| 271 | 271 | ||
| 272 | (defun crisp-mark-line (arg) | 272 | (defun crisp-mark-line (arg) |
| 273 | "Put mark at the end of line. Arg works as in `end-of-line'." | 273 | "Set mark at the end of the line. Arg works as in `end-of-line'." |
| 274 | (interactive "p") | 274 | (interactive "p") |
| 275 | (save-excursion | 275 | (let (newmark) |
| 276 | (if (and (eq last-command 'crisp-mark-line) (mark)) | 276 | (save-excursion |
| 277 | ;; Extend the previous state in the same direction: | ||
| 278 | (progn | ||
| 279 | (if (< (mark) (point)) (setq arg (- arg))) | ||
| 280 | (goto-char (mark)) | ||
| 281 | (end-of-line arg) | ||
| 282 | ;; Do not mess with the mark stack, but merely adjust the previous state: | ||
| 283 | (set-mark (point))) | ||
| 284 | (end-of-line arg) | 277 | (end-of-line arg) |
| 285 | (push-mark (point) nil t)))) | 278 | (setq newmark (point))) |
| 279 | (push-mark newmark nil t))) | ||
| 286 | 280 | ||
| 287 | (defun crisp-kill-line (arg) | 281 | (defun crisp-kill-line (arg) |
| 288 | "Mark and kill line(s). | 282 | "Mark and kill line(s). |