Mercurial > hg > xemacs-beta
changeset 687:d8c768dcca7a
[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.
author | youngs |
---|---|
date | Wed, 05 Dec 2001 04:09:25 +0000 |
parents | c82f9db998d7 |
children | c9d38610941f |
files | lisp/ChangeLog lisp/paragraphs.el |
diffstat | 2 files changed, 18 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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'.
--- 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.