all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* turn on flyspell mode permanently in .emacs
@ 2006-08-22  0:23 kevmitch
  2006-08-22 15:07 ` Kevin Rodgers
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: kevmitch @ 2006-08-22  0:23 UTC (permalink / raw)


So apparently, I'm doing something extremely stupid.
Flyspell works great if I type "M-x flyspell-mode RET", but that's not
good enough. I want it to be on all the time in every major mode
automatically unless I explicitly disable it. So I tried just about
every combination of all the relevant lines in my .emacs file to no
avail. My emacs starts up fine, but no flyspell-mode with out having to
manually issue the command. Can any kind soul out there please direct
me in what it is I'm doing wrong. Below are my .emacs and site-start.el
files.
Thanks,
Kevin

###########################################################
#  ~/.emacs
###########################################################
(custom-set-variables
  ;; custom-set-variables was added by Custom -- don't edit or
cut/paste it!
  ;; Your init file should contain only one such instance.
 '(column-number-mode t)
 '(matlab-auto-fill nil)
 '(matlab-comment-region-s "%"))
(custom-set-faces
  ;; custom-set-faces was added by Custom -- don't edit or cut/paste
it!
  ;; Your init file should contain only one such instance.
 )

(add-to-list 'auto-mode-alist '("\\.m$" . matlab-mode))
(autoload 'flyspell-mode "flyspell" "On-the-fly spelling checking" t)
(autoload 'global-flyspell-mode "flyspell" "On-the-fly spelling" t)
(flyspell-mode 1)

###########################################################
#  /etc/emacs/site-start.el
###########################################################

;; Emacsen independent startup file.  All of the various installed
;; flavors of emacs (emacs 19, emacs 20, xemacs) will load this file
;; at startup.  Make sure any code you put here is emacs flavor
;; independent.

;; Package maintainers: do not have Debian packages edit this file.
;; See the policy manual for the proper way to handle Emacs package
;; initialization code.

;; turn on colorization.
(require 'font-lock)
(setq font-lock-mode-maximum-decoration t)
(if (fboundp 'global-font-lock-mode) (global-font-lock-mode t))

;; Turn on selection and change the default color
(setq transient-mark-mode 't highlight-nonselected-windows 't)

;; Show parenthesis mode
(show-paren-mode t)

;; turn on auto (de)compression
(if (fboundp 'auto-compression-mode) (auto-compression-mode t))

;; keyboard short-cut for goto-line
(global-set-key [(meta g)] `goto-line)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: turn on flyspell mode permanently in .emacs
  2006-08-22  0:23 turn on flyspell mode permanently in .emacs kevmitch
@ 2006-08-22 15:07 ` Kevin Rodgers
  2006-08-22 15:24 ` Sebastian P. Luque
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 14+ messages in thread
From: Kevin Rodgers @ 2006-08-22 15:07 UTC (permalink / raw)


kevmitch@gmail.com wrote:
> So apparently, I'm doing something extremely stupid.
> Flyspell works great if I type "M-x flyspell-mode RET", but that's not
> good enough. I want it to be on all the time in every major mode
> automatically unless I explicitly disable it. So I tried just about
> every combination of all the relevant lines in my .emacs file to no
> avail. My emacs starts up fine, but no flyspell-mode with out having to
> manually issue the command. Can any kind soul out there please direct
> me in what it is I'm doing wrong. Below are my .emacs and site-start.el
> files.
> Thanks,
> Kevin
> 
> ###########################################################
> #  ~/.emacs
> ###########################################################
> (custom-set-variables
>   ;; custom-set-variables was added by Custom -- don't edit or
> cut/paste it!
>   ;; Your init file should contain only one such instance.
>  '(column-number-mode t)
>  '(matlab-auto-fill nil)
>  '(matlab-comment-region-s "%"))
> (custom-set-faces
>   ;; custom-set-faces was added by Custom -- don't edit or cut/paste
> it!
>   ;; Your init file should contain only one such instance.
>  )
> 
> (add-to-list 'auto-mode-alist '("\\.m$" . matlab-mode))
> (autoload 'flyspell-mode "flyspell" "On-the-fly spelling checking" t)
> (autoload 'global-flyspell-mode "flyspell" "On-the-fly spelling" t)

flyspell.el does not define a global-flyspell-mode command.

> (flyspell-mode 1)

That turns on flyspell in the current buffer, which is *scratch*
when ~/.emacs is loaded.

This is kind of off the wall, but you could try something like this:

(add-hook 'change-major-mode-hook
	  (lambda ()
	    (flyspell-mode 1)
	    (put 'flyspell-mode 'permanent-local t)))

-- 
Kevin

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: turn on flyspell mode permanently in .emacs
  2006-08-22  0:23 turn on flyspell mode permanently in .emacs kevmitch
  2006-08-22 15:07 ` Kevin Rodgers
@ 2006-08-22 15:24 ` Sebastian P. Luque
       [not found] ` <mailman.5446.1156260343.9609.help-gnu-emacs@gnu.org>
  2006-08-23 12:48 ` Johan Bockgård
  3 siblings, 0 replies; 14+ messages in thread
From: Sebastian P. Luque @ 2006-08-22 15:24 UTC (permalink / raw)


On 21 Aug 2006 17:23:55 -0700,
kevmitch@gmail.com wrote:

> So apparently, I'm doing something extremely stupid.  Flyspell works
> great if I type "M-x flyspell-mode RET", but that's not good enough. I
> want it to be on all the time in every major mode automatically unless I
> explicitly disable it. So I tried just about every combination of all
> the relevant lines in my .emacs file to no avail. My emacs starts up
> fine, but no flyspell-mode with out having to manually issue the
> command. Can any kind soul out there please direct me in what it is I'm
> doing wrong. Below are my .emacs and site-start.el files.

Did you try adding turn-on-flyspell to text-mode-hook?  That's what I use,
and it's on for almost every mode, as I think this hook is run by them.


-- 
Seb

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: turn on flyspell mode permanently in .emacs
       [not found] ` <mailman.5446.1156260343.9609.help-gnu-emacs@gnu.org>
@ 2006-08-22 20:12   ` kevmitch
  2006-08-22 21:11     ` Kevin Rodgers
       [not found]     ` <mailman.5465.1156281191.9609.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 14+ messages in thread
From: kevmitch @ 2006-08-22 20:12 UTC (permalink / raw)


Thanks for the advice. It would seem however that neither suggestion
worked. I took a look in my Messages buffer and found that it looks
like flyspell is in fact starting using the .emacs file above, but that
it just isn't taking effect for some reason. This remains to be the
case if I try the lambda function suggested by Kevin. However, using
the text-mode-hook without  (flyspell-mode 1) doesn't turn it on at
all. Here is my message buffer with the same .emacs file. It looks like
flyspell loads fine at the end, but unfortunately seems to have no
effect. Oddly enough, when I manually turn on flyspell-mode after
starting emacs with the (flyspell-mode 1) in my .emacs file, nothing
further is added to the message buffer (whereas it would be if I hadn't
already started flyspell-mode in the .emacs file). In spite of this
message silence, flyspell-mode does seem to magically start working.

Loading 50a2ps (source)...
Loading a2ps-print...done
Loading 50a2ps (source)...done
Loading 50auctex (source)...
Loading auctex.el (source)...
Loading /usr/share/emacs/21.4/site-lisp/tex-site.el (source)...done
Loading auctex.el (source)...done
Loading preview-latex.el (source)...done
Loading 50auctex (source)...done
Loading 50autoconf (source)...done
Loading 50devhelp (source)...done
Loading 50dictionaries-common (source)...
Loading debian-ispell...
Loading /var/cache/dictionaries-common/emacsen-ispell-default.el
(source)...done
Loading debian-ispell...done
Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el
(source)...done
Loading 50dictionaries-common (source)...done
Loading 50emacs-goodies-el (source)...done
Loading 50emacs-intl-fonts (source)...done
Loading 50ess (source)...
Loading regexp-opt...done
Loading mule-util...done
Loading ange-ftp...done
Loading 50ess (source)...done
Loading 50festival (source)...done
Loading 50ftnchek (source)...done
Loading 50gettext (source)...done
Loading 50gnuplot-mode (source)...done
Loading 50gri-el (source)...done
Loading 50gri-html-doc (source)...done
Loading 50maxima-emacs (source)...done
Loading 50nowebm (source)...done
Loading 50octave (source)...done
Loading 50octave2.1-emacsen (source)...done
Loading 50post-el (source)...done
Loading 50preview-latex (source)...done
Loading 50psgml-init (source)...done
Loading 50pymacs (source)...done
Loading 50pymacs-elisp (source)...done
Loading 50python-mode (source)...done
Loading 51preview-latex (source)...done
Loading paren...done
Loading jka-compr...done
Loading flyspell...
Loading advice...done
Loading flyspell...done
(Next local Ispell command will use british dictionary) [2 times]
Starting new Ispell process...
ispell.el is already loaded
For information about the GNU Project and its goals, type C-h C-p.

Sebastian P. Luque wrote:
> On 21 Aug 2006 17:23:55 -0700,
> kevmitch@gmail.com wrote:
>
> > So apparently, I'm doing something extremely stupid.  Flyspell works
> > great if I type "M-x flyspell-mode RET", but that's not good enough. I
> > want it to be on all the time in every major mode automatically unless I
> > explicitly disable it. So I tried just about every combination of all
> > the relevant lines in my .emacs file to no avail. My emacs starts up
> > fine, but no flyspell-mode with out having to manually issue the
> > command. Can any kind soul out there please direct me in what it is I'm
> > doing wrong. Below are my .emacs and site-start.el files.
>
> Did you try adding turn-on-flyspell to text-mode-hook?  That's what I use,
> and it's on for almost every mode, as I think this hook is run by them.
> 
> 
> -- 
> Seb

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: turn on flyspell mode permanently in .emacs
  2006-08-22 20:12   ` kevmitch
@ 2006-08-22 21:11     ` Kevin Rodgers
  2006-08-22 22:13       ` Noah Slater
       [not found]     ` <mailman.5465.1156281191.9609.help-gnu-emacs@gnu.org>
  1 sibling, 1 reply; 14+ messages in thread
From: Kevin Rodgers @ 2006-08-22 21:11 UTC (permalink / raw)


kevmitch@gmail.com wrote:
> Thanks for the advice. It would seem however that neither suggestion
> worked. I took a look in my Messages buffer and found that it looks
> like flyspell is in fact starting using the .emacs file above, but that
> it just isn't taking effect for some reason.

As I explained, you have turned it on in the *scratch* buffer only.

> This remains to be the
> case if I try the lambda function suggested by Kevin.

I'm not too surprised that didn't work -- it's quite a heavy-handed
hack.

 > However, using
> the text-mode-hook without  (flyspell-mode 1) doesn't turn it on at
> all.

Uh, of course not.

What buffer is current when you check whether flyspell mode is on
or not?  What is that buffer's major mode?

> Here is my message buffer with the same .emacs file.  It looks like
> flyspell loads fine at the end, but unfortunately seems to have no
> effect.

In what buffer?  The *scratch* buffer should have flyspell mode turned
on after your ~/.emacs file is loaded.

> Oddly enough, when I manually turn on flyspell-mode after
> starting emacs with the (flyspell-mode 1) in my .emacs file, nothing
> further is added to the message buffer (whereas it would be if I hadn't
> already started flyspell-mode in the .emacs file).

How do you manually turn on flyspell-mode?  (M-x flyspell-mode in a
buffer where it's already turned on will actually toggle it i.e. turn
it off.  You need to specify a prefix arg: C-u M-x flyspell-mode.)

> In spite of this
> message silence, flyspell-mode does seem to magically start working.
> 
> Loading 50a2ps (source)...
> Loading a2ps-print...done
> Loading 50a2ps (source)...done
> Loading 50auctex (source)...
> Loading auctex.el (source)...
> Loading /usr/share/emacs/21.4/site-lisp/tex-site.el (source)...done
> Loading auctex.el (source)...done
> Loading preview-latex.el (source)...done
> Loading 50auctex (source)...done
> Loading 50autoconf (source)...done
> Loading 50devhelp (source)...done
> Loading 50dictionaries-common (source)...
> Loading debian-ispell...
> Loading /var/cache/dictionaries-common/emacsen-ispell-default.el
> (source)...done
> Loading debian-ispell...done
> Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el
> (source)...done
> Loading 50dictionaries-common (source)...done
> Loading 50emacs-goodies-el (source)...done
> Loading 50emacs-intl-fonts (source)...done
> Loading 50ess (source)...
> Loading regexp-opt...done
> Loading mule-util...done
> Loading ange-ftp...done
> Loading 50ess (source)...done
> Loading 50festival (source)...done
> Loading 50ftnchek (source)...done
> Loading 50gettext (source)...done
> Loading 50gnuplot-mode (source)...done
> Loading 50gri-el (source)...done
> Loading 50gri-html-doc (source)...done
> Loading 50maxima-emacs (source)...done
> Loading 50nowebm (source)...done
> Loading 50octave (source)...done
> Loading 50octave2.1-emacsen (source)...done
> Loading 50post-el (source)...done
> Loading 50preview-latex (source)...done
> Loading 50psgml-init (source)...done
> Loading 50pymacs (source)...done
> Loading 50pymacs-elisp (source)...done
> Loading 50python-mode (source)...done
> Loading 51preview-latex (source)...done
> Loading paren...done
> Loading jka-compr...done
> Loading flyspell...
> Loading advice...done
> Loading flyspell...done
> (Next local Ispell command will use british dictionary) [2 times]
> Starting new Ispell process...
> ispell.el is already loaded
> For information about the GNU Project and its goals, type C-h C-p.

I'm surprised it doesn't say "Flyspell mode enabled" somewhere after
"Loading flyspell...done".

Your best bet is to get rid of (flyspell-mode 1) at the top level of
your ~/.emacs file, because we know it won't do what you asked for, and
to follow Sebastien's advice:

(add-hook 'text-mode-hook
	  (lambda () (flyspell-mode 1)))

-- 
Kevin

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: turn on flyspell mode permanently in .emacs
  2006-08-22 21:11     ` Kevin Rodgers
@ 2006-08-22 22:13       ` Noah Slater
  2006-08-23 14:24         ` Kevin Rodgers
       [not found]         ` <mailman.5502.1156343431.9609.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 14+ messages in thread
From: Noah Slater @ 2006-08-22 22:13 UTC (permalink / raw)
  Cc: help-gnu-emacs

Here are some samples from my site-start.el which may help you:

(defun activate-flyspell ()
  "Turn on flyspell-mode and call flyspell-buffer."
  (interactive)
  ;; This next line REALLY slows buffer switching.
  (flyspell-mode)
  (flyspell-buffer))

(defvar customised-hooks-alist
  '(emacs-lisp-mode-hook
    nxml-mode-hook
    python-mode-hook
    sh-mode-hook
    text-mode-hook)
  "An alist of hooks that require customisations.")

(unless noninteractive
  ;; Activate flyspell for various major modes.
  (add-hook-list customised-hooks-alist 'activate-flyspell))

-- 
"Creativity can be a social contribution, but only in so
far as society is free to use the results." - R. Stallman

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: turn on flyspell mode permanently in .emacs
       [not found]     ` <mailman.5465.1156281191.9609.help-gnu-emacs@gnu.org>
@ 2006-08-22 22:46       ` kevmitch
  2006-08-23  2:32         ` Sebastian P. Luque
  2006-08-23 14:36         ` Kevin Rodgers
  0 siblings, 2 replies; 14+ messages in thread
From: kevmitch @ 2006-08-22 22:46 UTC (permalink / raw)


> In what buffer?  The *scratch* buffer should have flyspell mode turned
> on after your ~/.emacs file is loaded.
It appears that even with (flyspell-mode 1) in the top level of the
.emacs file
flyspell mode is not on in any buffer; not even the scratch buffer.

> How do you manually turn on flyspell-mode?  (M-x flyspell-mode in a
> buffer where it's already turned on will actually toggle it i.e. turn
> it off.  You need to specify a prefix arg: C-u M-x flyspell-mode.)
yeah, I just use M-x flyspell-mode to turn it on which suggests that it
really isn't on  prior to this.

> I'm surprised it doesn't say "Flyspell mode enabled" somewhere after
> "Loading flyspell...done".
This is a good point.

> Your best bet is to get rid of (flyspell-mode 1) at the top level of
> your ~/.emacs file, because we know it won't do what you asked for, and
> to follow Sebastien's advice:
>
> (add-hook 'text-mode-hook
> 	  (lambda () (flyspell-mode 1)))
Ok, I hadn't tried exactly that. You'll have to bear with me. This lisp
stuff is rather obtuse to the beginner. Unfortunately, this doesn't
have the desired behavior either. It does however turn on flyspell in
the scratch buffer if I enter the command "M-x text-mode". I can also
get it to turn on automatically if I open a .m file (which puts emacs
in matlab-mode) if I have the following lines in my .emacs file:

(add-hook 'matlab-mode-hook
 	  (lambda () (flyspell-mode 1)))

So that's something.

To keep things simple, I have otherwise been opening the .emacs file,
which puts me in a buffer titled .emacs, but the exact name of the mode
seems to be trickier. I get a pulldown menu titled  Emacs-Lisp, which
might suggest that I'm in Emacs-Lisp-mode. However M-x Emacs-Lisp-mode
returns no match. I guess this is really beside the issue, because I
don't want to have to worry about what mode I'm in. I just want
flyspell to be on all the time. Is it just wishful thinking that there
might be an any-mode-hook?

Thanks for taking the time to think about this.
Kevin

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: turn on flyspell mode permanently in .emacs
  2006-08-22 22:46       ` kevmitch
@ 2006-08-23  2:32         ` Sebastian P. Luque
  2006-08-23 14:36         ` Kevin Rodgers
  1 sibling, 0 replies; 14+ messages in thread
From: Sebastian P. Luque @ 2006-08-23  2:32 UTC (permalink / raw)


On 22 Aug 2006 15:46:44 -0700,
kevmitch@gmail.com wrote:

[...]

> To keep things simple, I have otherwise been opening the .emacs file,
> which puts me in a buffer titled .emacs, but the exact name of the mode
> seems to be trickier. I get a pulldown menu titled Emacs-Lisp, which
> might suggest that I'm in Emacs-Lisp-mode. However M-x Emacs-Lisp-mode
> returns no match. I guess this is really beside the issue, because I
> don't want to have to worry about what mode I'm in. I just want flyspell
> to be on all the time. Is it just wishful thinking that there might be
> an any-mode-hook?


Why not simply do 'customize-option text-mode-hook'?  There's even a
button for turn-on-flyspell, which in my Emacs activates flyspell mode for
most modes.  Choose to save your changes for future sessions.

Of course, comment all other customizations you may have outside the
'customize' interface.  You can later study whether the modes you want
flyspell for call the text-mode-hook, and add them to the appropriate mode
hook if they don't.


Cheers,

-- 
Seb

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: turn on flyspell mode permanently in .emacs
  2006-08-22  0:23 turn on flyspell mode permanently in .emacs kevmitch
                   ` (2 preceding siblings ...)
       [not found] ` <mailman.5446.1156260343.9609.help-gnu-emacs@gnu.org>
@ 2006-08-23 12:48 ` Johan Bockgård
  3 siblings, 0 replies; 14+ messages in thread
From: Johan Bockgård @ 2006-08-23 12:48 UTC (permalink / raw)


kevmitch@gmail.com writes:

> So apparently, I'm doing something extremely stupid. Flyspell works
> great if I type "M-x flyspell-mode RET", but that's not good enough.
> I want it to be on all the time in every major mode automatically
> unless I explicitly disable it.

(defun my-turn-on-flyspell () (flyspell-mode 1))

(easy-mmode-define-global-mode
 global-flyspell-mode flyspell-mode my-turn-on-flyspell)

(global-flyspell-mode 1)

-- 
Johan Bockgård

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: turn on flyspell mode permanently in .emacs
  2006-08-22 22:13       ` Noah Slater
@ 2006-08-23 14:24         ` Kevin Rodgers
       [not found]         ` <mailman.5502.1156343431.9609.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 14+ messages in thread
From: Kevin Rodgers @ 2006-08-23 14:24 UTC (permalink / raw)


Noah Slater wrote:
> Here are some samples from my site-start.el which may help you:
> 
> (defun activate-flyspell ()
>  "Turn on flyspell-mode and call flyspell-buffer."
>  (interactive)
>  ;; This next line REALLY slows buffer switching.
>  (flyspell-mode)
>  (flyspell-buffer))
> 
> (defvar customised-hooks-alist
>  '(emacs-lisp-mode-hook
>    nxml-mode-hook
>    python-mode-hook
>    sh-mode-hook
>    text-mode-hook)
>  "An alist of hooks that require customisations.")
> 
> (unless noninteractive
>  ;; Activate flyspell for various major modes.
>  (add-hook-list customised-hooks-alist 'activate-flyspell))

Don't you want to turn on flyspell-prog-mode instead, in
emacs-lisp-mode, python-mode, and sh-mode?

-- 
Kevin

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: turn on flyspell mode permanently in .emacs
  2006-08-22 22:46       ` kevmitch
  2006-08-23  2:32         ` Sebastian P. Luque
@ 2006-08-23 14:36         ` Kevin Rodgers
  2006-08-23 14:53           ` Noah Slater
  1 sibling, 1 reply; 14+ messages in thread
From: Kevin Rodgers @ 2006-08-23 14:36 UTC (permalink / raw)


kevmitch@gmail.com wrote:
>> In what buffer?  The *scratch* buffer should have flyspell mode turned
>> on after your ~/.emacs file is loaded.
> It appears that even with (flyspell-mode 1) in the top level of the
> .emacs file
> flyspell mode is not on in any buffer; not even the scratch buffer.

That is a puzzle.

>> How do you manually turn on flyspell-mode?  (M-x flyspell-mode in a
>> buffer where it's already turned on will actually toggle it i.e. turn
>> it off.  You need to specify a prefix arg: C-u M-x flyspell-mode.)
> yeah, I just use M-x flyspell-mode to turn it on which suggests that it
> really isn't on  prior to this.

Yes.

>> I'm surprised it doesn't say "Flyspell mode enabled" somewhere after
>> "Loading flyspell...done".
> This is a good point.
> 
>> Your best bet is to get rid of (flyspell-mode 1) at the top level of
>> your ~/.emacs file, because we know it won't do what you asked for, and
>> to follow Sebastien's advice:
>>
>> (add-hook 'text-mode-hook
>> 	  (lambda () (flyspell-mode 1)))
> Ok, I hadn't tried exactly that. You'll have to bear with me. This lisp
> stuff is rather obtuse to the beginner. Unfortunately, this doesn't
> have the desired behavior either. It does however turn on flyspell in
> the scratch buffer if I enter the command "M-x text-mode".

Naturally: the *scratch* buffer is Lisp Interaction mode by default,
not Text mode.

As Sebastien explained, text-mode-hook is also run by *many* other
text-oriented modes (Mail mode, SGML mode, etc.)

> I can also
> get it to turn on automatically if I open a .m file (which puts emacs
> in matlab-mode) if I have the following lines in my .emacs file:
> 
> (add-hook 'matlab-mode-hook
>  	  (lambda () (flyspell-mode 1)))
> 
> So that's something.

You might want to try (flyspell-prog-mode) there instead.

> To keep things simple, I have otherwise been opening the .emacs file,
> which puts me in a buffer titled .emacs, but the exact name of the mode
> seems to be trickier. I get a pulldown menu titled  Emacs-Lisp, which
> might suggest that I'm in Emacs-Lisp-mode. However M-x Emacs-Lisp-mode
> returns no match.

,----[ C-h v major-mode RET ]
| major-mode is a variable defined in `C source code'.
| Its value is emacs-lisp-mode
| Local in buffer .emacs; global value is fundamental-mode
| Automatically becomes buffer-local when set in any fashion.
|
| Documentation:
| Symbol for current buffer's major mode.
|
| [back]
`----

> I guess this is really beside the issue, because I
> don't want to have to worry about what mode I'm in. I just want
> flyspell to be on all the time. Is it just wishful thinking that there
> might be an any-mode-hook?

Yes, that is wishful thinking.  The closest thing is change-major-mode-hook,
but you reported that my hack that used it didn't actually work.

> Thanks for taking the time to think about this.

You're welcome!

-- 
Kevin

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: turn on flyspell mode permanently in .emacs
  2006-08-23 14:36         ` Kevin Rodgers
@ 2006-08-23 14:53           ` Noah Slater
  2006-08-23 21:27             ` Kevin Rodgers
  0 siblings, 1 reply; 14+ messages in thread
From: Noah Slater @ 2006-08-23 14:53 UTC (permalink / raw)
  Cc: help-gnu-emacs

> > I guess this is really beside the issue, because I
> > don't want to have to worry about what mode I'm in. I just want
> > flyspell to be on all the time. Is it just wishful thinking that there
> > might be an any-mode-hook?

How about 'find-file-hooks?

-- 
"Creativity can be a social contribution, but only in so
far as society is free to use the results." - R. Stallman

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: turn on flyspell mode permanently in .emacs
       [not found]         ` <mailman.5502.1156343431.9609.help-gnu-emacs@gnu.org>
@ 2006-08-23 16:34           ` kevmitch
  0 siblings, 0 replies; 14+ messages in thread
From: kevmitch @ 2006-08-23 16:34 UTC (permalink / raw)


> Don't you want to turn on flyspell-prog-mode instead, in
> emacs-lisp-mode, python-mode, and sh-mode?
Aha! I didn't know about that. So maybe I do want to turn on flyspell
mode by mode.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: turn on flyspell mode permanently in .emacs
  2006-08-23 14:53           ` Noah Slater
@ 2006-08-23 21:27             ` Kevin Rodgers
  0 siblings, 0 replies; 14+ messages in thread
From: Kevin Rodgers @ 2006-08-23 21:27 UTC (permalink / raw)


Noah Slater wrote:
>> > I guess this is really beside the issue, because I
>> > don't want to have to worry about what mode I'm in. I just want
>> > flyspell to be on all the time. Is it just wishful thinking that there
>> > might be an any-mode-hook?
> 
> How about 'find-file-hooks?

Good idea (although find-file-hook is preferred in Emacs 22).  And
find-file-not-found-functions (or -hooks, in Emacs 21), for new files.

-- 
Kevin

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2006-08-23 21:27 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-22  0:23 turn on flyspell mode permanently in .emacs kevmitch
2006-08-22 15:07 ` Kevin Rodgers
2006-08-22 15:24 ` Sebastian P. Luque
     [not found] ` <mailman.5446.1156260343.9609.help-gnu-emacs@gnu.org>
2006-08-22 20:12   ` kevmitch
2006-08-22 21:11     ` Kevin Rodgers
2006-08-22 22:13       ` Noah Slater
2006-08-23 14:24         ` Kevin Rodgers
     [not found]         ` <mailman.5502.1156343431.9609.help-gnu-emacs@gnu.org>
2006-08-23 16:34           ` kevmitch
     [not found]     ` <mailman.5465.1156281191.9609.help-gnu-emacs@gnu.org>
2006-08-22 22:46       ` kevmitch
2006-08-23  2:32         ` Sebastian P. Luque
2006-08-23 14:36         ` Kevin Rodgers
2006-08-23 14:53           ` Noah Slater
2006-08-23 21:27             ` Kevin Rodgers
2006-08-23 12:48 ` Johan Bockgård

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.