It seems that Emacs tries to autodetect the type of file and changes some of its behaviors accordingly. I don't want any of this behavior. I just want Emacs to treat every file as if it were some generic text file. The thing that is currently annoying me is that when Emacs thinks I'm editing a LaTeX file, it won't let me type the " character without changing it to tex-style quotes. Is there a line I can put in my .emacs file to simply turn off all of this kind of stuff completely?

From googling, it looks like this is called an "input method," but the only lisp code I can find doesn't seem like it would do what I want. For example, there is a function called set-input-mode, but it doesn't seem to allow control over this. There are also things like toggle-input-method and (setq-default default-input-method ..., but those don't seem like what I'm looking for either.

  • Do you see the same problem if you start Emacs using emacs -Q (no init file)? If not, then bisect your init file to find the culprit.
    – Drew
    Jul 10, 2020 at 0:14
  • @Drew: I do see the same problem if I use -Q. I think this is just generic behavior of emacs. It seems to be triggered by the fact that the filename ends in .tex.
    – user5457
    Jul 10, 2020 at 0:19

1 Answer 1


After some more googling, I think I found the answer to my own question. The following code works:

(setq auto-mode-alist ())

The list auto-mode-alist seems to be a hash that has file extensions as keys and major modes as values: https://www.emacswiki.org/emacs/AutoModeAlist

  • 1
    I was just going to suggest that :-)
    – NickD
    Jul 10, 2020 at 0:30
  • You should probably accept your answer.
    – NickD
    Jul 12, 2020 at 12:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.