0

I disable the following the modes in init.el

;;flycheck-mode                                                                                                               
;;flymake-mode                                                                                                                
(flycheck-mode nil)
(flymake-mode nil)
(prettify-symbols-mode nil)

However, they did not work as expected.

My emacs.d excluding 'init.el` cloned from purcell/emacs.d: An Emacs configuration bundle with batteries included

the flycheck-mode flymake-mode and prettify-symbols-mode are enabled by defautl.

The above three are of type function, why not working by passing nil to them?

3

All the modes you list are minor modes defined by define-minor-mode.

From the doc of define-minor-mode:

When called from Lisp, the mode command toggles the mode if the argument is ‘toggle’, disables the mode if the argument is a non-positive integer, and enables the mode otherwise (including if the argument is omitted or nil or a positive integer).

So, you enable the mode when you call it with nil argument. You should call it with a non-positive integer like 0 or -1,... instead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.