diff options
author | Kai Großjohann <kgrossjo@eu.uu.net> | 2002-02-17 15:08:31 +0000 |
---|---|---|
committer | Kai Großjohann <kgrossjo@eu.uu.net> | 2002-02-17 15:08:31 +0000 |
commit | be0d25b6863857a290fba53006df20f28e26a2a2 (patch) | |
tree | e062e1fba64f5934b04629e39bb33083993f9455 /lisp/textmodes/paragraphs.el | |
parent | a9c6d330d55b3c79780146346de165bb96ddfaba (diff) | |
download | emacs-be0d25b6863857a290fba53006df20f28e26a2a2.tar.gz |
* emacs-lisp/lisp.el (mark-defun): Don't leave multiple marks
when repeated.
* textmodes/paragraphs.el (mark-paragraph): Ditto.
Diffstat (limited to 'lisp/textmodes/paragraphs.el')
-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. If this command is repeated, it marks the next ARG paragraphs after (or before, if arg is negative) the ones already marked." (interactive "p") - (let (here) - (unless arg (setq arg 1)) - (when (zerop arg) - (error "Cannot mark zero paragraphs")) - (when (and (eq last-command this-command) (mark t)) - (setq here (point)) - (goto-char (mark))) - (forward-paragraph arg) - (push-mark nil t t) - (if here - (goto-char here) - (backward-paragraph arg)))) + (unless arg (setq arg 1)) + (when (zerop arg) + (error "Cannot mark zero paragraphs")) + (cond ((and (eq last-command this-command) (mark t)) + (set-mark + (save-excursion + (goto-char (mark)) + (forward-paragraph arg) + (point)))) + (t + (forward-paragraph arg) + (push-mark nil t t) + (backward-paragraph arg)))) (defun kill-paragraph (arg) "Kill forward to end of paragraph. |