]> git.eshelyaron.com Git - emacs.git/commitdiff
(text-mode-hook-identify): Restore previous definition.
authorRichard M. Stallman <rms@gnu.org>
Thu, 14 Feb 2002 01:31:21 +0000 (01:31 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 14 Feb 2002 01:31:21 +0000 (01:31 +0000)
Add to text-mode-hook again.

lisp/ChangeLog
lisp/textmodes/text-mode.el

index ea88f416b5915c0d8e2f8c408dc9bf2450b58fb8..56fc5bcf6c6b1e11c4b81bddc02f11c9ab4fcdf9 100644 (file)
@@ -5,6 +5,9 @@
 
 2002-02-13  Richard M. Stallman  <rms@gnu.org>
 
+       * 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.
index 2fe9efecdbdc34164b483bc1ed0ab68441284b5c..ad39b6f896e609044296534ce3958d528d219866 100644 (file)
@@ -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.