# HG changeset patch
# User youngs
# Date 1007525365 0
# Node ID d8c768dcca7a53ba0f4f230be9b443f94be3f38b
# Parent  c82f9db998d71875411fe137141f98a368f5b6bb
[xemacs-hg @ 2001-12-05 04:09:24 by youngs]
2001-12-04  John Paul Wallington  <jpw@shootybangbang.com>

	* paragraphs.el (mark-paragraph): synched with FSF;
        added optional argument.

diff -r c82f9db998d7 -r d8c768dcca7a lisp/ChangeLog
--- a/lisp/ChangeLog	Mon Dec 03 18:02:50 2001 +0000
+++ b/lisp/ChangeLog	Wed Dec 05 04:09:25 2001 +0000
@@ -1,3 +1,8 @@
+2001-12-04  John Paul Wallington  <jpw@shootybangbang.com>
+
+	* paragraphs.el (mark-paragraph): synched with FSF; 
+        added optional argument.
+
 2001-12-03  Didier Verna  <didier@xemacs.org>
 
 	* rect.el: autoload `replace-rectangle'.
diff -r c82f9db998d7 -r d8c768dcca7a lisp/paragraphs.el
--- a/lisp/paragraphs.el	Mon Dec 03 18:02:50 2001 +0000
+++ b/lisp/paragraphs.el	Wed Dec 05 04:09:25 2001 +0000
@@ -1,6 +1,7 @@
 ;;; paragraphs.el --- paragraph and sentence parsing.
 
-;; Copyright (C) 1985, 86, 87, 91, 94, 95, 97 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 86, 87, 91, 94, 95, 97, 2001 
+;;   Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Keywords: wp, dumped
@@ -292,13 +293,19 @@
   (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 arg N, puts mark at end of following N paragraphs;
+negative arg -N means 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.