|
From: | Andreas Röhler |
Subject: | Re: python-mode from plain txt-files? |
Date: | Wed, 6 May 2020 21:50:12 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 |
On 06.05.20 21:20, Eli Zaretskii wrote:
From: Andreas Röhler <andreas.roehler@easy-emacs.de> Date: Wed, 6 May 2020 21:13:47 +0200 from emacs -Q, when opening file with ending ".txt" which contains #! /usr/bin/env python3 python-mode is started. Is this correct? Understand the mode is ruled by a files ending, not just by some contents.That's a simplification. The full story is described in the ELisp manual, under set-auto-mode (node "Auto Major Mode").How to open such a file in fundamental-mode?"M-x fundamental-mode RET"?
Than Emacs hangs already, it's not accessible any more.
Or temporarily disable interpreter-mode-alist
When evaluating in scratch-buffer (setq auto-mode-alist nil) python-mode still appears.Isn't it a bug? IMO files with ending ".txt" shouldn't be set in any programming language mode.
[Prev in Thread] | Current Thread | [Next in Thread] |