7

It sounds easy but I can't fix it: I want to permanently disable automatic spell-checking in emacs. There must be a simple line for my init.el. Can somebody help me?

BoltClock
729k165 gold badges1.4k silver badges1.4k bronze badges
asked Aug 6, 2010 at 12:15

6 Answers 6

11

Figure out why it's on in the first place (it isn't enabled by default), then fix that. Either your init file is turning it on, or else some system-wide init file is. Read about those files: http://www.gnu.org/software/emacs/manual/html_node/emacs/Init-File.html

answered Aug 6, 2010 at 15:15
Sign up to request clarification or add additional context in comments.

4 Comments

Thank you, I managed it :-) I found a file called "myspell.el" in folder "site-lisp". There I could change (flyspell-mode t) to (flyspell-mode 0) and it worked!
I'd suggest deleting that file entirely, after figuring out where it came from and what it's trying to do.
Is site-lisp actually local to you, though? Make sure you're not disabling functionality for other users. If it's just you, and you are disabling only that portion of the file, you might as well delete that sexp entirely -- remove "(flyspell-mode t)" rather than replacing it with "(flyspell-mode 0)"
I'm the only user, so there's no problem. I followed your advice and uncommented the "(flyspell-mode t)". It works well. I didn't dare to delete the file at all. Maybe I want flyspell back some time. Thank you all for your help :)
7

From a brief look, the simplest way I can see is to redefine the function:

(eval-after-load "flyspell"
 '(defun flyspell-mode (&optional arg)))

or you could use advice to force the argument to always be -1 (see C-h f turn-off-flyspell), but that would be slightly more complex and less efficient for no good reason.

If you want to know what is running it in the first place, you could use M-x debug-on-entry flyspell-mode, which will show a stack trace when the function is called (q to exit the debugger; C-h m to list other commands; M-: (info "(elisp)debugger") for help). Use M-x cancel-debug-on-entry to remove that breakpoint.

answered Aug 6, 2010 at 13:55

Comments

5
(flyspell-mode 0)
answered Aug 6, 2010 at 13:51

2 Comments

With respect, this simply doesn't do what the question asked. Switching flyspell mode off in this manner does nothing to prevent it being switched back on again.
That really didn't work in the "init.el". But with the help by user offby1 above I found a file called "myspell.el" in folder "site-lisp". There I could change (flyspell-mode t) to (flyspell-mode 0) and it worked :-) Thank you!
0

I found mine in ~/.emacs.d/usk/text.el

I deleted the block of code having to do with FlySpell and closed emacs.

After reopening emacs, I still saw the spelling error (red underline). However, I simply deleted and retyped the "misspelled" words and then, emacs didn't underline. Problem solved.

I'm running Debian.

answered Jun 11, 2012 at 16:13

Comments

0

In my case flyspell-mode has been gaining ground in the .emacs.desktop file.

This was not the first time that desktop-mode causes pain in restoring obsolete things. In this case it restored all modes on a per-file basis, although in .emacs.el I had already disabled flyspell-mode and flyspell-prog-mode everywhere.

Solution: either edit the .emacs.desktop file or delete it.

answered Jun 26, 2013 at 10:32

Comments

0

Using Emacs graphical mode you can just right click above "Fly" minor mode bellow and select "Turn Off minor mode" like this:

Just right click above Fly

answered Apr 4, 2014 at 5:12

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.