help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: turn on flyspell mode permanently in .emacs


From: Kevin Rodgers
Subject: Re: turn on flyspell mode permanently in .emacs
Date: Tue, 22 Aug 2006 09:07:19 -0600
User-agent: Thunderbird 1.5.0.5 (Windows/20060719)

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





reply via email to

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