2

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?

Tobias
  • 33,167
  • 1
  • 37
  • 77
Alice
  • 219
  • 1
  • 8

1 Answers1

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.

Tobias
  • 33,167
  • 1
  • 37
  • 77