mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 04:10:54 -08:00
(text-mode-hook-identify): New function,
put on text-mode-hook. Set text-mode-variant here. (text-mode): Don't set it here.
This commit is contained in:
parent
57a5447071
commit
d910f08cc1
1 changed files with 8 additions and 2 deletions
|
|
@ -78,8 +78,6 @@ Turning on Text mode runs the normal hook `text-mode-hook'."
|
|||
(setq paragraph-start (concat "[ \t]*$\\|" page-delimiter))
|
||||
(make-local-variable 'paragraph-separate)
|
||||
(setq paragraph-separate paragraph-start)
|
||||
(make-local-variable 'text-mode-variant)
|
||||
(setq text-mode-variant t)
|
||||
(setq mode-name "Text")
|
||||
(setq major-mode 'text-mode)
|
||||
(run-hooks 'text-mode-hook))
|
||||
|
|
@ -103,6 +101,14 @@ Turning on Paragraph-Indent Text mode runs the normal hooks
|
|||
|
||||
(defalias 'indented-text-mode 'text-mode)
|
||||
|
||||
(defun text-mode-hook-identify ()
|
||||
"Mark that this mode has run `text-mode-hook'.
|
||||
This is how `toggle-text-mode-auto-fill' knows which buffers to operate on."
|
||||
(make-local-variable 'text-mode-variant)
|
||||
(setq text-mode-variant t))
|
||||
|
||||
(add-hook 'text-mode-hook 'text-mode-hook-identify)
|
||||
|
||||
(defun toggle-text-mode-auto-fill ()
|
||||
"Toggle whether to use Auto Fill in Text mode and related modes.
|
||||
This command affects all buffers that use modes related to Text mode,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue