# HG changeset patch # User Richard M. Stallman # Date 1104284071 0 # Node ID 4b5e5c2f1ee0bad693682bfd7858716c06fe4c30 # Parent abe8f4f2982cb811d271ff8634524a0094583125 (mark-paragraph): New arg ALLOW-EXTEND enables the feature to extend the existing region. diff -r abe8f4f2982c -r 4b5e5c2f1ee0 lisp/textmodes/paragraphs.el --- a/lisp/textmodes/paragraphs.el Wed Dec 29 01:33:04 2004 +0000 +++ b/lisp/textmodes/paragraphs.el Wed Dec 29 01:34:31 2004 +0000 @@ -347,7 +347,7 @@ (or arg (setq arg 1)) (forward-paragraph (- arg))) -(defun mark-paragraph (&optional arg) +(defun mark-paragraph (&optional arg allow-extend) "Put point at beginning of this paragraph, mark at end. The paragraph marked is the one that contains point or follows point. @@ -357,15 +357,16 @@ If ARG is negative, point is put at end of this paragraph, mark is put at beginning of this or a previous paragraph. -If this command is repeated or mark is active in Transient Mark mode, -it marks the next ARG paragraphs after (or before, if arg is negative) -the ones already marked." - (interactive "p") +Interactively, if this command is repeated +or (in Transient Mark mode) if the mark is active, +it marks the next ARG paragraphs after the ones already marked." + (interactive "p\np") (unless arg (setq arg 1)) (when (zerop arg) (error "Cannot mark zero paragraphs")) - (cond ((or (and (eq last-command this-command) (mark t)) - (and transient-mark-mode mark-active)) + (cond ((and allow-extend + (or (and (eq last-command this-command) (mark t)) + (and transient-mark-mode mark-active))) (set-mark (save-excursion (goto-char (mark))