diff options
| author | Kai Großjohann | 2002-02-17 15:08:31 +0000 |
|---|---|---|
| committer | Kai Großjohann | 2002-02-17 15:08:31 +0000 |
| commit | be0d25b6863857a290fba53006df20f28e26a2a2 (patch) | |
| tree | e062e1fba64f5934b04629e39bb33083993f9455 /lisp/textmodes | |
| parent | a9c6d330d55b3c79780146346de165bb96ddfaba (diff) | |
| download | emacs-be0d25b6863857a290fba53006df20f28e26a2a2.tar.gz emacs-be0d25b6863857a290fba53006df20f28e26a2a2.zip | |
* emacs-lisp/lisp.el (mark-defun): Don't leave multiple marks
when repeated.
* textmodes/paragraphs.el (mark-paragraph): Ditto.
Diffstat (limited to 'lisp/textmodes')
| -rw-r--r-- | lisp/textmodes/paragraphs.el | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el index 91d9b1699f9..bc4cac2a088 100644 --- a/lisp/textmodes/paragraphs.el +++ b/lisp/textmodes/paragraphs.el | |||
| @@ -330,18 +330,19 @@ at beginning of this or a previous paragraph. | |||
| 330 | If this command is repeated, it marks the next ARG paragraphs after (or | 330 | If this command is repeated, it marks the next ARG paragraphs after (or |
| 331 | before, if arg is negative) the ones already marked." | 331 | before, if arg is negative) the ones already marked." |
| 332 | (interactive "p") | 332 | (interactive "p") |
| 333 | (let (here) | 333 | (unless arg (setq arg 1)) |
| 334 | (unless arg (setq arg 1)) | 334 | (when (zerop arg) |
| 335 | (when (zerop arg) | 335 | (error "Cannot mark zero paragraphs")) |
| 336 | (error "Cannot mark zero paragraphs")) | 336 | (cond ((and (eq last-command this-command) (mark t)) |
| 337 | (when (and (eq last-command this-command) (mark t)) | 337 | (set-mark |
| 338 | (setq here (point)) | 338 | (save-excursion |
| 339 | (goto-char (mark))) | 339 | (goto-char (mark)) |
| 340 | (forward-paragraph arg) | 340 | (forward-paragraph arg) |
| 341 | (push-mark nil t t) | 341 | (point)))) |
| 342 | (if here | 342 | (t |
| 343 | (goto-char here) | 343 | (forward-paragraph arg) |
| 344 | (backward-paragraph arg)))) | 344 | (push-mark nil t t) |
| 345 | (backward-paragraph arg)))) | ||
| 345 | 346 | ||
| 346 | (defun kill-paragraph (arg) | 347 | (defun kill-paragraph (arg) |
| 347 | "Kill forward to end of paragraph. | 348 | "Kill forward to end of paragraph. |