From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Olive Newsgroups: gmane.emacs.help Subject: Automatically enable python mode Date: Thu, 18 Oct 2012 14:32:42 +0200 Organization: Aioe.org NNTP Server Message-ID: <20121018143242.37910206@pcolivier.chezmoi.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1350563715 28233 80.91.229.3 (18 Oct 2012 12:35:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 18 Oct 2012 12:35:15 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Oct 18 14:35:23 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TOpJp-0001nz-Vg for geh-help-gnu-emacs@m.gmane.org; Thu, 18 Oct 2012 14:35:22 +0200 Original-Received: from localhost ([::1]:46636 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOpJi-0001N0-Am for geh-help-gnu-emacs@m.gmane.org; Thu, 18 Oct 2012 08:35:14 -0400 Original-Path: usenet.stanford.edu!newsfeed.news.ucla.edu!news.snarked.org!feeder.erje.net!news.stack.nl!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 16 Original-NNTP-Posting-Host: 4z7Niknim7qOYystFuW6nA.user.speranza.aioe.org Original-X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: Claws Mail 3.8.1 (GTK+ 2.24.11; i686-pc-linux-gnu) Original-Xref: usenet.stanford.edu gnu.emacs.help:194985 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:87315 Archived-At: I am using arch GNU/Linux. If a file contains: #! /usr/bin/python as the first line, the python mode is automatically enabled. However, due to the fact that python 2 and python 3 coexists, in order that the correct python version is reliably involved, the first line must be #! /usr/bin/python2 or #! /usr/bin/python3 How can I tell emacs that it have to automatically enable python mode when one of the two line is the first line? Olive