From: Geralt <usr.gentoo@googlemail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Enable some modes in every buffer
Date: Fri, 20 Feb 2009 11:16:06 +0100 [thread overview]
Message-ID: <fbdd0e50902200216x3a279eafmc93b2c0fc4eb5538@mail.gmail.com> (raw)
In-Reply-To: <uvdr6m1fy.fsf@myhost.sbcglobal.net>
You probably don't want to start flyspell in every major mode, there
are modes like dired or shell where it just makes no sense to have
flyspell enabled and then there are the programming major modes where
you have to call flyspell-prog-mode.
I'm currently calling the following function in my .emacs:
(defun hook-flyspell-mode ()
"Adds flyspell mode to some major modes."
(dolist (hook '(org-mode-hook))
(add-hook hook (lambda () (flyspell-mode 1))))
(dolist (hook '(c-mode-hook c++-mode-hook sh-mode-hook emacs-lisp-mode-hook))
(add-hook hook (lambda () (flyspell-prog-mode)))))
And I just add all the major modes to it in which I really want flyspell mode.
Geralt.
next prev parent reply other threads:[~2009-02-20 10:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1211.1235074945.31690.help-gnu-emacs@gnu.org>
2009-02-19 23:50 ` Enable some modes in every buffer Chetan
2009-02-20 10:16 ` Geralt [this message]
2009-02-19 20:22 TheLonelyStar
2009-02-19 22:16 ` Tassilo Horn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fbdd0e50902200216x3a279eafmc93b2c0fc4eb5538@mail.gmail.com \
--to=usr.gentoo@googlemail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.