Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how do I disable Flyspell?

Tags:

emacs

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?

like image 516
ploppy Avatar asked Aug 06 '10 12:08

ploppy


3 Answers

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

like image 121
offby1 Avatar answered Oct 24 '22 23:10

offby1


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.

like image 30
phils Avatar answered Oct 25 '22 00:10

phils


(flyspell-mode 0)
like image 35
Hamza Yerlikaya Avatar answered Oct 24 '22 23:10

Hamza Yerlikaya