From: Richard M. Stallman Date: Wed, 29 Dec 2004 01:35:21 +0000 (+0000) Subject: (mark-paragraph): New arg ALLOW-EXTEND X-Git-Tag: ttn-vms-21-2-B4~3077 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=94ed093133a86d71b3dff6a1c07d36428949331a;p=emacs.git (mark-paragraph): New arg ALLOW-EXTEND enables the feature to extend the existing region. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9a56b6d2a61..b447d51f3fa 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -4,6 +4,20 @@ 2004-12-28 Richard M. Stallman + * simple.el (undo-extra-outer-limit): New variable. + (undo-outer-limit-truncate): Test and set it. + + * emacs-lisp/lisp.el (mark-sexp, mark-defun): New arg ALLOW-EXTEND + enables the feature to extend the existing region. + + * simple.el (mark-word): New arg ALLOW-EXTEND + enables the feature to extend the existing region. + + * textmodes/paragraphs.el (mark-paragraph): New arg ALLOW-EXTEND + enables the feature to extend the existing region. + + * startup.el (site-run-file): Don't allow setting it with Custom. + * simple.el (buffer-disable-undo): Fix previous change. 2004-12-27 Masatake YAMATO diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el index 353aa0ee8a2..7728ea7b463 100644 --- a/lisp/textmodes/paragraphs.el +++ b/lisp/textmodes/paragraphs.el @@ -347,7 +347,7 @@ See `forward-paragraph' for more information." (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 @@ 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. -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))