Xref: utzoo gnu.emacs.help:445 comp.emacs:9635 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!julius.cs.uiuc.edu!wuarchive!emory!gatech!uflorida!mathlab!mathlab.math.ufl.edu!squash From: squash@math.ufl.edu (Jonathan King) Newsgroups: gnu.emacs.help,comp.emacs Subject: I'd like to always use PlainTeX, not Latex; How? Message-ID: Date: 29 Nov 90 18:52:16 GMT Sender: news@mathlab.math.ufl.EDU Organization: University of Florida Department of Mathematics Lines: 50 (This is a reposting -the first time apparently did not post (?)) Hello. When I visit a file with extension .tex I would like that its buffer be automatically put in plain-tex-mode, and never in latex-mode. -- If you can tell me how to do this, read no further. -- My .emacs file contains (setq auto-mode-alist '( ; Determines automatic choice of major mode based on file extension. ("\\.tex$" . tex-mode) ("\\.sty$" . tex-mode) ...)) When I visit a .tex file, tex-mode apparently looks at the file and guesses whether it is "plain", or "latex". Sometimes it guesses wrong -in my case, whenever it guesses "latex". To try to make it choose "plain", I put (setq tex-default-mode 'plain-tex-mode) in .emacs This solves the problem 90% of the time. To get a 100% solution I tried (setq auto-mode-alist '( ; Determines automatic choice of major mode based on file extension. ("\\.tex$" . plain-tex-mode) ("\\.sty$" . plain-tex-mode) ...)) *This* failed in a spectacular way. On our system, the command tex-mode is apparently bound to execute something called cmutex. Cmutex's keymap is called tex-mode-map (lowercase). However, the tex-mode which comes with the standard GNU release is some other command and *it* uses TeX-mode-map (some uppercase) for its local map. When I made the above change to auto-mode-alist, cmutex was apparently *not* called -the other tex mode was, and all of my key binding naturally broke. Out of curiosity, I'd like to know why cmutex didn't run. Out of practicality, how can I always cause cmutex to be invoked in its "plain" state-of-mind? Jonathan