From ebda95a20c9fb82667af576e72676bde324fde75 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 14 Feb 2002 01:31:21 +0000 Subject: [PATCH] (text-mode-hook-identify): Restore previous definition. Add to text-mode-hook again. --- lisp/ChangeLog | 3 +++ lisp/textmodes/text-mode.el | 10 ++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ea88f416b59..56fc5bcf6c6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -5,6 +5,9 @@ 2002-02-13 Richard M. Stallman + * textmodes/text-mode.el (text-mode-hook-identify): Restore + previous definition. Add to text-mode-hook again. + * mail/mailabbrev.el (define-mail-abbrev): Define as system abbrev. (mail-abbrev-in-expansion-header-p): Copy the code of mail-header-end to avoid needing sendmail.el at run time. diff --git a/lisp/textmodes/text-mode.el b/lisp/textmodes/text-mode.el index 2fe9efecdbd..ad39b6f896e 100644 --- a/lisp/textmodes/text-mode.el +++ b/lisp/textmodes/text-mode.el @@ -95,8 +95,14 @@ Turning on Paragraph-Indent minor mode runs the normal hook (defalias 'indented-text-mode 'text-mode) -;; No-op, defined because some user customizations use it. -(defun text-mode-hook-identify () nil) +;; This can be made a no-op once all modes that use text-mode-hook +;; are "derived" from 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." + (set (make-local-variable '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. -- 2.39.2