aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/textmodes
diff options
context:
space:
mode:
authorKai Großjohann2002-02-17 15:08:31 +0000
committerKai Großjohann2002-02-17 15:08:31 +0000
commitbe0d25b6863857a290fba53006df20f28e26a2a2 (patch)
treee062e1fba64f5934b04629e39bb33083993f9455 /lisp/textmodes
parenta9c6d330d55b3c79780146346de165bb96ddfaba (diff)
downloademacs-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.el25
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.
330If this command is repeated, it marks the next ARG paragraphs after (or 330If this command is repeated, it marks the next ARG paragraphs after (or
331before, if arg is negative) the ones already marked." 331before, 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.