Mercurial > emacs
comparison lisp/textmodes/page.el @ 5022:61203f0197e8
Add `provide'.
(narrow-to-page): Enable page-delimiter to span lines.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 15 Nov 1993 06:48:23 +0000 |
parents | bddd28afcc26 |
children | 5b4ba06e910f |
comparison
equal
deleted
inserted
replaced
5021:47afb35f4968 | 5022:61203f0197e8 |
---|---|
85 ;; Find the end of the page. | 85 ;; Find the end of the page. |
86 (forward-page) | 86 (forward-page) |
87 ;; If we stopped due to end of buffer, stay there. | 87 ;; If we stopped due to end of buffer, stay there. |
88 ;; If we stopped after a page delimiter, put end of restriction | 88 ;; If we stopped after a page delimiter, put end of restriction |
89 ;; at the beginning of that line. | 89 ;; at the beginning of that line. |
90 (if (save-excursion (beginning-of-line) | 90 (if (save-excursion |
91 (looking-at page-delimiter)) | 91 (goto-char (match-beginning 0)) ; was (beginning-of-line) |
92 (looking-at page-delimiter)) | |
92 (beginning-of-line)) | 93 (beginning-of-line)) |
93 (narrow-to-region (point) | 94 (narrow-to-region (point) |
94 (progn | 95 (progn |
95 ;; Find the top of the page. | 96 ;; Find the top of the page. |
96 (forward-page -1) | 97 (forward-page -1) |
134 (while (re-search-forward page-delimiter opoint t) | 135 (while (re-search-forward page-delimiter opoint t) |
135 (setq count (1+ count))) | 136 (setq count (1+ count))) |
136 (message "Page %d, line %d" | 137 (message "Page %d, line %d" |
137 count | 138 count |
138 (1+ (count-lines (point) opoint))))))) | 139 (1+ (count-lines (point) opoint))))))) |
140 | |
141 ;;; Place `provide' at end of file. | |
142 (provide 'page) | |
139 | 143 |
140 ;;; page.el ends here | 144 ;;; page.el ends here |