Mercurial > hg > xemacs-beta
comparison lisp/paragraphs.el @ 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 | 98528da0b7fc |
children | 9ec13301bb30 |
comparison
equal
deleted
inserted
replaced
686:c82f9db998d7 | 687:d8c768dcca7a |
---|---|
1 ;;; paragraphs.el --- paragraph and sentence parsing. | 1 ;;; paragraphs.el --- paragraph and sentence parsing. |
2 | 2 |
3 ;; Copyright (C) 1985, 86, 87, 91, 94, 95, 97 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1985, 86, 87, 91, 94, 95, 97, 2001 |
4 ;; Free Software Foundation, Inc. | |
4 | 5 |
5 ;; Maintainer: FSF | 6 ;; Maintainer: FSF |
6 ;; Keywords: wp, dumped | 7 ;; Keywords: wp, dumped |
7 | 8 |
8 ;; This file is part of XEmacs. | 9 ;; This file is part of XEmacs. |
290 See `forward-paragraph' for more information." | 291 See `forward-paragraph' for more information." |
291 (interactive "_p") ; XEmacs | 292 (interactive "_p") ; XEmacs |
292 (or arg (setq arg 1)) | 293 (or arg (setq arg 1)) |
293 (forward-paragraph (- arg))) | 294 (forward-paragraph (- arg))) |
294 | 295 |
295 (defun mark-paragraph () | 296 (defun mark-paragraph (&optional arg) |
296 "Put point at beginning of this paragraph, mark at end. | 297 "Put point at beginning of this paragraph, mark at end. |
297 The paragraph marked is the one that contains point or follows point." | 298 The paragraph marked is the one that contains point or follows point. |
298 (interactive) | 299 With arg N, puts mark at end of following N paragraphs; |
299 (forward-paragraph 1) | 300 negative arg -N means point is put at end of this paragraph, mark is put |
301 at beginning of this or a previous paragraph." | |
302 (interactive "p") | |
303 (unless arg (setq arg 1)) | |
304 (when (zerop arg) | |
305 (error "Cannot mark zero paragraphs")) | |
306 (forward-paragraph arg) | |
300 (push-mark nil t t) | 307 (push-mark nil t t) |
301 (backward-paragraph 1)) | 308 (backward-paragraph arg)) |
302 | 309 |
303 (defun kill-paragraph (arg) | 310 (defun kill-paragraph (arg) |
304 "Kill forward to end of paragraph. | 311 "Kill forward to end of paragraph. |
305 With arg N, kill forward to Nth end of paragraph; | 312 With arg N, kill forward to Nth end of paragraph; |
306 negative arg -N means kill backward to Nth start of paragraph." | 313 negative arg -N means kill backward to Nth start of paragraph." |