Mercurial > hg > xemacs-beta
comparison lisp/prim/paragraphs.el @ 159:3bb7ccffb0c0 r20-3b6
Import from CVS: tag r20-3b6
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:41:43 +0200 |
parents | 360340f9fd5f |
children |
comparison
equal
deleted
inserted
replaced
158:558dfa75ffb3 | 159:3bb7ccffb0c0 |
---|---|
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 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1985, 86, 87, 91, 94, 95, 97 Free Software Foundation, Inc. |
4 | 4 |
5 ;; Maintainer: FSF | 5 ;; Maintainer: FSF |
6 ;; Keywords: wp | 6 ;; Keywords: wp |
7 | 7 |
8 ;; This file is part of XEmacs. | 8 ;; This file is part of XEmacs. |
26 | 26 |
27 ;;; Commentary: | 27 ;;; Commentary: |
28 | 28 |
29 ;; This package provides the paragraph-oriented commands documented in the | 29 ;; This package provides the paragraph-oriented commands documented in the |
30 ;; XEmacs Reference Manual. | 30 ;; XEmacs Reference Manual. |
31 | |
32 ;; 06/11/1997 - Use char-(after|before) instead of | |
33 ;; (following|preceding)-char. -slb | |
31 | 34 |
32 ;;; Code: | 35 ;;; Code: |
33 | 36 |
34 (defvar use-hard-newlines nil | 37 (defvar use-hard-newlines nil |
35 "Non-nil means to distinguish hard and soft newlines. | 38 "Non-nil means to distinguish hard and soft newlines. |
281 (start-of-paragraph-text)))))) | 284 (start-of-paragraph-text)))))) |
282 | 285 |
283 (defun end-of-paragraph-text () | 286 (defun end-of-paragraph-text () |
284 (let ((opoint (point))) | 287 (let ((opoint (point))) |
285 (forward-paragraph 1) | 288 (forward-paragraph 1) |
286 (if (eq (preceding-char) ?\n) (forward-char -1)) | 289 (if (eq (char-before (point)) ?\n) (forward-char -1)) |
287 (if (<= (point) opoint) | 290 (if (<= (point) opoint) |
288 (progn | 291 (progn |
289 (forward-char 1) | 292 (forward-char 1) |
290 (if (< (point) (point-max)) | 293 (if (< (point) (point-max)) |
291 (end-of-paragraph-text)))))) | 294 (end-of-paragraph-text)))))) |