unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* buffer-read-only is always t at text-mode-hook time
@ 2004-08-10  3:40 Dan Jacobson
       [not found] ` <E1Buzoi-00078M-CW@fencepost.gnu.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Dan Jacobson @ 2004-08-10  3:40 UTC (permalink / raw)


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.

^ permalink raw reply	[flat|nested] 9+ messages in thread
[parent not found: <mailman.715.1092171969.2011.bug-gnu-emacs@gnu.org>]

end of thread, other threads:[~2004-09-05  1:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-10  3:40 buffer-read-only is always t at text-mode-hook time Dan Jacobson
     [not found] ` <E1Buzoi-00078M-CW@fencepost.gnu.org>
2004-08-13 20:05   ` Dan Jacobson
     [not found]     ` <E1Bw9P8-0000Tg-Br@fencepost.gnu.org>
2004-08-15  2:50       ` Dan Jacobson
     [not found]       ` <mailman.1298.1092602041.2011.bug-gnu-emacs@gnu.org>
2004-08-16 16:22         ` Kevin Rodgers
2004-08-18  1:34           ` Richard Stallman
     [not found]   ` <mailman.1089.1092431153.2011.bug-gnu-emacs@gnu.org>
2004-08-13 22:13     ` Kevin Rodgers
2004-09-03 21:26       ` mention other ways than add-hook also Dan Jacobson
     [not found]         ` <E1C3ilv-0002xz-GA@fencepost.gnu.org>
2004-09-05  1:52           ` Dan Jacobson
     [not found] <mailman.715.1092171969.2011.bug-gnu-emacs@gnu.org>
2004-08-11 15:33 ` buffer-read-only is always t at text-mode-hook time Kevin Rodgers

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).