emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] text-mode-hook-identify should be part of the standard value


From: Richard Stallman
Subject: Re: [PATCH] text-mode-hook-identify should be part of the standard value for text-mode-hook
Date: Thu, 7 Feb 2002 07:57:09 -0700 (MST)

Your fix was reasonable, but the use of a hook function here is not
a good idea in the first place.  So I changed the code to do the
job another way:

*** text-mode.el.~1.36.~        Tue Oct 30 13:11:01 2001
--- text-mode.el        Wed Feb  6 09:56:16 2002
***************
*** 65,70 ****
--- 65,72 ----
   (see the variable `adaptive-fill-mode').
  \\{text-mode-map}
  Turning on Text mode runs the normal hook `text-mode-hook'."
+   (make-local-variable 'text-mode-variant)
+   (setq text-mode-variant t)
    (set (make-local-variable 'indent-line-function) 'indent-relative))
  
  (define-derived-mode paragraph-indent-text-mode text-mode "Parindent"
***************
*** 92,104 ****
    (run-hooks 'paragraph-indent-text-mode-hook))
        
  (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."
-   (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.
--- 94,99 ----



reply via email to

[Prev in Thread] Current Thread [Next in Thread]