Mercurial > emacs
comparison lisp/textmodes/text-mode.el @ 88155:d7ddb3e565de
sync with trunk
author | Henrik Enberg <henrik.enberg@telia.com> |
---|---|
date | Mon, 16 Jan 2006 00:03:54 +0000 |
parents | 5ade352e8d1c |
children |
comparison
equal
deleted
inserted
replaced
88154:8ce476d3ba36 | 88155:d7ddb3e565de |
---|---|
1 ;;; text-mode.el --- text mode, and its idiosyncratic commands | 1 ;;; text-mode.el --- text mode, and its idiosyncratic commands |
2 | 2 |
3 ;; Copyright (C) 1985, 1992, 1994 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1985, 1992, 1994, 2002, 2003, 2004, |
4 ;; 2005 Free Software Foundation, Inc. | |
4 | 5 |
5 ;; Maintainer: FSF | 6 ;; Maintainer: FSF |
6 ;; Keywords: wp | 7 ;; Keywords: wp |
7 | 8 |
8 ;; This file is part of GNU Emacs. | 9 ;; This file is part of GNU Emacs. |
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
18 ;; GNU General Public License for more details. | 19 ;; GNU General Public License for more details. |
19 | 20 |
20 ;; You should have received a copy of the GNU General Public License | 21 ;; You should have received a copy of the GNU General Public License |
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the | 22 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 23 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
23 ;; Boston, MA 02111-1307, USA. | 24 ;; Boston, MA 02110-1301, USA. |
24 | 25 |
25 ;;; Commentary: | 26 ;;; Commentary: |
26 | 27 |
27 ;; This package provides the fundamental text mode documented in the | 28 ;; This package provides the fundamental text mode documented in the |
28 ;; Emacs user's manual. | 29 ;; Emacs user's manual. |
66 (see the variable `adaptive-fill-mode'). | 67 (see the variable `adaptive-fill-mode'). |
67 \\{text-mode-map} | 68 \\{text-mode-map} |
68 Turning on Text mode runs the normal hook `text-mode-hook'." | 69 Turning on Text mode runs the normal hook `text-mode-hook'." |
69 (make-local-variable 'text-mode-variant) | 70 (make-local-variable 'text-mode-variant) |
70 (setq text-mode-variant t) | 71 (setq text-mode-variant t) |
71 (set (make-local-variable 'require-final-newline) t) | 72 (set (make-local-variable 'require-final-newline) |
73 mode-require-final-newline) | |
72 (set (make-local-variable 'indent-line-function) 'indent-relative)) | 74 (set (make-local-variable 'indent-line-function) 'indent-relative)) |
73 | 75 |
74 (define-derived-mode paragraph-indent-text-mode text-mode "Parindent" | 76 (define-derived-mode paragraph-indent-text-mode text-mode "Parindent" |
75 "Major mode for editing text, with leading spaces starting a paragraph. | 77 "Major mode for editing text, with leading spaces starting a paragraph. |
76 In this mode, you do not need blank lines between paragraphs | 78 In this mode, you do not need blank lines between paragraphs |
85 | 87 |
86 (defun paragraph-indent-minor-mode () | 88 (defun paragraph-indent-minor-mode () |
87 "Minor mode for editing text, with leading spaces starting a paragraph. | 89 "Minor mode for editing text, with leading spaces starting a paragraph. |
88 In this mode, you do not need blank lines between paragraphs when the | 90 In this mode, you do not need blank lines between paragraphs when the |
89 first line of the following paragraph starts with whitespace, as with | 91 first line of the following paragraph starts with whitespace, as with |
90 `paragraph-indent-mode'. | 92 `paragraph-indent-text-mode'. |
91 Turning on Paragraph-Indent minor mode runs the normal hook | 93 Turning on Paragraph-Indent minor mode runs the normal hook |
92 `paragraph-indent-text-mode-hook'." | 94 `paragraph-indent-text-mode-hook'." |
93 (interactive) | 95 (interactive) |
94 (set (make-local-variable 'paragraph-start) | 96 (set (make-local-variable 'paragraph-start) |
95 (concat "[ \t\n\f]\\|" paragraph-start)) | 97 (concat "[ \t\n\f]\\|" paragraph-start)) |
176 (forward-line 1)) | 178 (forward-line 1)) |
177 ((< nlines 0) | 179 ((< nlines 0) |
178 (setq nlines (1+ nlines)) | 180 (setq nlines (1+ nlines)) |
179 (forward-line -1))))) | 181 (forward-line -1))))) |
180 | 182 |
183 ;;; arch-tag: a07ccaad-da13-4d7b-9c61-cd04f5926aab | |
181 ;;; text-mode.el ends here | 184 ;;; text-mode.el ends here |