43 |
(let ((st (make-syntax-table))) |
(let ((st (make-syntax-table))) |
44 |
(modify-syntax-entry ?\" ". " st) |
(modify-syntax-entry ?\" ". " st) |
45 |
(modify-syntax-entry ?\\ ". " st) |
(modify-syntax-entry ?\\ ". " st) |
46 |
(modify-syntax-entry ?' "w " st) |
;; We add `p' so that M-c on 'hello' leads to 'Hello' rather than 'hello'. |
47 |
|
(modify-syntax-entry ?' "w p" st) |
48 |
st) |
st) |
49 |
"Syntax table used while in `text-mode'.") |
"Syntax table used while in `text-mode'.") |
50 |
|
|
68 |
Turning on Text mode runs the normal hook `text-mode-hook'." |
Turning on Text mode runs the normal hook `text-mode-hook'." |
69 |
(make-local-variable 'text-mode-variant) |
(make-local-variable 'text-mode-variant) |
70 |
(setq text-mode-variant t) |
(setq text-mode-variant t) |
71 |
|
(set (make-local-variable 'require-final-newline) t) |
72 |
(set (make-local-variable 'indent-line-function) 'indent-relative)) |
(set (make-local-variable 'indent-line-function) 'indent-relative)) |
73 |
|
|
74 |
(define-derived-mode paragraph-indent-text-mode text-mode "Parindent" |
(define-derived-mode paragraph-indent-text-mode text-mode "Parindent" |
80 |
\\{text-mode-map} |
\\{text-mode-map} |
81 |
Turning on Paragraph-Indent Text mode runs the normal hooks |
Turning on Paragraph-Indent Text mode runs the normal hooks |
82 |
`text-mode-hook' and `paragraph-indent-text-mode-hook'." |
`text-mode-hook' and `paragraph-indent-text-mode-hook'." |
83 |
|
:abbrev-table nil :syntax-table nil |
84 |
(paragraph-indent-minor-mode)) |
(paragraph-indent-minor-mode)) |
85 |
|
|
86 |
(defun paragraph-indent-minor-mode () |
(defun paragraph-indent-minor-mode () |
95 |
(concat "[ \t\n\f]\\|" paragraph-start)) |
(concat "[ \t\n\f]\\|" paragraph-start)) |
96 |
(set (make-local-variable 'indent-line-function) 'indent-to-left-margin) |
(set (make-local-variable 'indent-line-function) 'indent-to-left-margin) |
97 |
(run-hooks 'paragraph-indent-text-mode-hook)) |
(run-hooks 'paragraph-indent-text-mode-hook)) |
98 |
|
|
99 |
(defalias 'indented-text-mode 'text-mode) |
(defalias 'indented-text-mode 'text-mode) |
100 |
|
|
101 |
;; This can be made a no-op once all modes that use text-mode-hook |
;; This can be made a no-op once all modes that use text-mode-hook |