From mboxrd@z Thu Jan 1 00:00:00 1970 Path: quimby.gnus.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel 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) Message-ID: <200202071457.g17Ev9B04626@aztec.santafe.edu> References: <200201302237.g0UMb1d24844@aztec.santafe.edu> <200202040927.g149RUF02434@aztec.santafe.edu> <200202051248.g15CmDb02207@aztec.santafe.edu> Reply-To: rms@gnu.org NNTP-Posting-Host: quimby2.netfonds.no X-Trace: quimby2.netfonds.no 1013094516 16631 195.204.10.66 (7 Feb 2002 15:08:36 GMT) X-Complaints-To: usenet@quimby2.netfonds.no NNTP-Posting-Date: 7 Feb 2002 15:08:36 GMT Cc: emacs-devel@gnu.org Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby2.netfonds.no with esmtp (Exim 3.12 #1 (Debian)) id 16YqA7-0004K9-00 for ; Thu, 07 Feb 2002 16:08:35 +0100 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.33 #1 (Debian)) id 16Yq25-0001t9-00; Thu, 07 Feb 2002 10:00:17 -0500 Original-Received: from pele.santafe.edu ([192.12.12.119]) by fencepost.gnu.org with esmtp (Exim 3.33 #1 (Debian)) id 16Ypz4-0001VK-00; Thu, 07 Feb 2002 09:57:10 -0500 Original-Received: from aztec.santafe.edu (aztec [192.12.12.49]) by pele.santafe.edu (8.9.3/8.9.3) with ESMTP id HAA13554; Thu, 7 Feb 2002 07:57:09 -0700 (MST) Original-Received: (from rms@localhost) by aztec.santafe.edu (8.10.2+Sun/8.9.3) id g17Ev9B04626; Thu, 7 Feb 2002 07:57:09 -0700 (MST) X-Authentication-Warning: aztec.santafe.edu: rms set sender to rms@aztec using -f Original-To: abraham@dina.kvl.dk In-reply-to: (message from Per Abrahamsen on Tue, 05 Feb 2002 17:59:22 +0100) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.5 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: quimby.gnus.org gmane.emacs.devel:849 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:849 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 ---- _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel