When try to disable 'auto-fill-mode`, I search the following answers

how to disable minor mode (enabled using prog-mode-hook) for a particular major mode

This answer narrow it focus on the python-mode

word wrap - How can I disable auto-fill mode in emacs? - Stack Overflow

This answer provide various solutions.

(auto-fill-mode -1)
(remove-hook 'text-mode-hook #'turn-on-auto-fill)

What's the decent solution to disable a minor mode in version 26+

  • auto-fill-mode is a special case. The general question "What's the decent solution to disable a minor mode in version 26+" is a separate question. Normally, auto-fill-mode is globally disabled and you turn it on by some methods. So the answer would be to reverse the configuration that turns on auto-fill-mode in your setup. – Tobias Jul 9 '19 at 21:46
  • Note that auto-fill-mode is a configuration option in text-mode-hook. Try to customize text-mode-hook. – Tobias Jul 9 '19 at 21:52
  • If it's a general problem then you should find in your own config where you are enabling auto-fill-mode (or setting auto-fill-function), and then stop doing that. If it's only enabled in a small number of situations, then give us more information about that. – phils Jul 9 '19 at 23:06

Your Answer

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

Browse other questions tagged or ask your own question.