ploppy
ploppy

Reputation: 175

how do I disable Flyspell?

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?

Upvotes: 7

Views: 6299

Answers (6)

Felipe
Felipe

Reputation: 17181

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

Upvotes: 0

Andreas Spindler
Andreas Spindler

Reputation: 8140

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.

Upvotes: 0

boulder_ruby
boulder_ruby

Reputation: 39695

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.

Upvotes: 0

offby1
offby1

Reputation: 6993

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

Upvotes: 11

phils
phils

Reputation: 73274

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.

Upvotes: 7

Hamza Yerlikaya
Hamza Yerlikaya

Reputation: 49329

(flyspell-mode 0)

Upvotes: 5

Related Questions