changeset 41709:df0a6a02b580

(mark-paragraph): Clarify doc. Clarify error message. Suggestion from Richard Stallman.
author Kai Großjohann <kgrossjo@eu.uu.net>
date Fri, 30 Nov 2001 17:18:27 +0000
parents 8439236b7552
children 6515e3108ceb
files lisp/ChangeLog lisp/textmodes/paragraphs.el
diffstat 2 files changed, 23 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Fri Nov 30 13:49:28 2001 +0000
+++ b/lisp/ChangeLog	Fri Nov 30 17:18:27 2001 +0000
@@ -1,3 +1,12 @@
+2001-11-30  Kai Gro,A_(Bjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* textmodes/paragraphs.el (mark-paragraph): Clarify doc.  Clarify
+	error message.  Suggestion from Richard Stallman.
+
+2001-11-29  Kai Grossjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* textmodes/paragraphs.el (mark-paragraph): Allow prefix arg.
+
 2001-11-30  Andre Spiegel  <spiegel@gnu.org>
 
 	* vc-cvs.el (vc-cvs-parse-status): Store file state in property,
--- a/lisp/textmodes/paragraphs.el	Fri Nov 30 13:49:28 2001 +0000
+++ b/lisp/textmodes/paragraphs.el	Fri Nov 30 17:18:27 2001 +0000
@@ -317,13 +317,22 @@
   (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.