comparison lisp/textmodes/text-mode.el @ 4744:ea4df8504763

(indented-text-mode): Make only blank lines separate or start paragraphs. Doc fix.
author Richard M. Stallman <rms@gnu.org>
date Sun, 19 Sep 1993 19:32:35 +0000
parents 5a2c0c38a0a1
children bc777b8e4b45
comparison
equal deleted inserted replaced
4743:f05c414fe229 4744:ea4df8504763
85 (let ((newmap (make-sparse-keymap))) 85 (let ((newmap (make-sparse-keymap)))
86 (define-key newmap "\t" 'indent-relative) 86 (define-key newmap "\t" 'indent-relative)
87 (setq indented-text-mode-map (nconc newmap text-mode-map)))) 87 (setq indented-text-mode-map (nconc newmap text-mode-map))))
88 88
89 (defun indented-text-mode () 89 (defun indented-text-mode ()
90 "Major mode for editing indented text intended for humans to read. 90 "Major mode for editing text with indented paragraphs.
91 In this mode, paragraphs are delimited only by blank lines.
92 You can thus get the benefit of adaptive filling
93 (see the variable `adaptive-fill-mode').
91 \\{indented-text-mode-map} 94 \\{indented-text-mode-map}
92 Turning on `indented-text-mode' calls the value of the variable 95 Turning on `indented-text-mode' calls the value of the variable
93 `text-mode-hook', if that value is non-nil." 96 `text-mode-hook', if that value is non-nil."
94 (interactive) 97 (interactive)
95 (kill-all-local-variables) 98 (kill-all-local-variables)
97 (define-abbrev-table 'text-mode-abbrev-table ()) 100 (define-abbrev-table 'text-mode-abbrev-table ())
98 (setq local-abbrev-table text-mode-abbrev-table) 101 (setq local-abbrev-table text-mode-abbrev-table)
99 (set-syntax-table text-mode-syntax-table) 102 (set-syntax-table text-mode-syntax-table)
100 (make-local-variable 'indent-line-function) 103 (make-local-variable 'indent-line-function)
101 (setq indent-line-function 'indent-relative-maybe) 104 (setq indent-line-function 'indent-relative-maybe)
105 (make-local-variable 'paragraph-start)
106 (setq paragraph-start (concat "^$\\|" page-delimiter))
107 (make-local-variable 'paragraph-separate)
108 (setq paragraph-separate paragraph-start)
102 (use-local-map indented-text-mode-map) 109 (use-local-map indented-text-mode-map)
103 (setq mode-name "Indented Text") 110 (setq mode-name "Indented Text")
104 (setq major-mode 'indented-text-mode) 111 (setq major-mode 'indented-text-mode)
105 (run-hooks 'text-mode-hook)) 112 (run-hooks 'text-mode-hook))
106 113