From f48b59a233c74b1ec21489591ec101b48c779323 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kai=20Gro=C3=9Fjohann?= Date: Fri, 30 Nov 2001 17:18:27 +0000 Subject: [PATCH] (mark-paragraph): Clarify doc. Clarify error message. Suggestion from Richard M. Stallman. --- lisp/ChangeLog | 9 +++++++++ lisp/textmodes/paragraphs.el | 19 ++++++++++++++----- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9e513ddf253..d4e3d12b3f6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2001-11-30 Kai Gro,A_(Bjohann + + * textmodes/paragraphs.el (mark-paragraph): Clarify doc. Clarify + error message. Suggestion from Richard Stallman. + +2001-11-29 Kai Grossjohann + + * textmodes/paragraphs.el (mark-paragraph): Allow prefix arg. + 2001-11-30 Andre Spiegel * vc-cvs.el (vc-cvs-parse-status): Store file state in property, diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el index 8b9ca150ea9..ed9a78696fd 100644 --- a/lisp/textmodes/paragraphs.el +++ b/lisp/textmodes/paragraphs.el @@ -317,13 +317,22 @@ See `forward-paragraph' for more information." (or arg (setq arg 1)) (forward-paragraph (- arg))) -(defun mark-paragraph () +(defun mark-paragraph (&optional arg) "Put point at beginning of this paragraph, mark at end. -The paragraph marked is the one that contains point or follows point." - (interactive) - (forward-paragraph 1) +The paragraph marked is the one that contains point or follows point. + +With argument ARG, puts mark at end of a following paragraph, so that +the number of paragraphs marked equals ARG. + +If ARG is negative, point is put at end of this paragraph, mark is put +at beginning of this or a previous paragraph." + (interactive "p") + (unless arg (setq arg 1)) + (when (zerop arg) + (error "Cannot mark zero paragraphs")) + (forward-paragraph arg) (push-mark nil t t) - (backward-paragraph 1)) + (backward-paragraph arg)) (defun kill-paragraph (arg) "Kill forward to end of paragraph. -- 2.39.2