From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Dan Jacobson Newsgroups: gmane.emacs.bugs Subject: buffer-read-only is always t at text-mode-hook time Date: Tue, 10 Aug 2004 11:40:03 +0800 Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1092171738 13362 80.91.224.253 (10 Aug 2004 21:02:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 10 Aug 2004 21:02:18 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 10 23:02:12 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Budl6-0005oO-00 for ; Tue, 10 Aug 2004 23:02:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Budov-0007ro-4U for geb-bug-gnu-emacs@m.gmane.org; Tue, 10 Aug 2004 17:06:09 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1Budot-0007rj-Cn for bug-gnu-emacs@gnu.org; Tue, 10 Aug 2004 17:06:07 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1Budoq-0007rX-Nr for bug-gnu-emacs@gnu.org; Tue, 10 Aug 2004 17:06:07 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Budoq-0007rU-L1 for bug-gnu-emacs@gnu.org; Tue, 10 Aug 2004 17:06:04 -0400 Original-Received: from [204.74.68.40] (helo=frodo.hserus.net) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1Budkv-0008Ci-U2 for bug-gnu-emacs@gnu.org; Tue, 10 Aug 2004 17:02:02 -0400 Original-Received: from tc218-187-79-124.2-4.dynamic.apol.com.tw ([218.187.79.124]:33267 helo=jidanni1) by frodo.hserus.net with asmtp (Cipher TLSv1:RC4-SHA:128) (Exim 4.41 #0) id 1Budkd-000NvX-In by authid with plain for ; Wed, 11 Aug 2004 02:31:52 +0530 Original-Received: from jidanni by jidanni1 with local (Exim 4.34) id 1BuNUZ-0001pT-9X for bug-gnu-emacs@gnu.org; Tue, 10 Aug 2004 11:40:03 +0800 Original-To: bug-gnu-emacs@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:8675 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:8675 Perhaps this would work: (add-hook 'text-mode-hook (lambda () (or buffer-read-only (and(turn-on-auto-fill)(flyspell-mode 1))))) But buffer-read-only is always true when text-mode-hook is evaluated apparently. While a fix is being made, any workarounds? You see I don't want to turn on flyspell-mode for files I have no hope of editing. flyspell.el might add an example of how not to turn on flyspell-mode for files one has no hope of editing. P.S. the Info, the first hooks example (add-hook 'text-mode-hook 'turn-on-auto-fill) should also show how to not turn it on for files one has no hope of editing. While there, tell folks how also to set a hook just in case they need to override. Don't only mention just add-hook. BTW, I also don't want to turn on flyspell-mode for files that are real big.