Package: emacs23
Version: 23.4+1-4
Severity: wishlist
Tags: patch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Dear Maintainer,

An executable script file having shebang line like

#!/usr/bin/python3

is not recognized as python script by python-mode.
This is due to the fact that python3 is not registered to
interpreter-mode-alist in lisp/progmodes/python.el.

On Debian, it seems that `python3' is the standard name for
the interpreter for python3.x, so it would be nice to handle
these script as python-mode.

The attached straightforward patch fixes this problem on emacs23.

Best regards,
- -- 
Ryo IGARASHI, Ph.D.
rigar...@gmail.com

- -- System Information:
Debian Release: wheezy/sid
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'unstable'), (500, 'testing'), 
(500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-3-amd64 (SMP w/3 CPU cores)
Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages emacs23 depends on:
ii  emacs23-bin-common  23.4+1-4
ii  gconf-service       3.2.5-1+build1
ii  libasound2          1.0.25-4
ii  libatk1.0-0         2.4.0-2
ii  libc6               2.13-35
ii  libcairo2           1.12.2-2
ii  libdbus-1-3         1.6.8-1
ii  libfontconfig1      2.9.0-7
ii  libfreetype6        2.4.9-1
ii  libgconf-2-4        3.2.5-1+build1
ii  libgdk-pixbuf2.0-0  2.26.1-1
ii  libgif4             4.1.6-9.1
ii  libglib2.0-0        2.33.12+really2.32.4-2
ii  libgpm2             1.20.4-6
ii  libgtk2.0-0         2.24.10-2
ii  libice6             2:1.0.8-2
ii  libjpeg8            8d-1
ii  libm17n-0           1.6.3-2
ii  libncurses5         5.9-10
ii  libotf0             0.9.12-2
ii  libpango1.0-0       1.30.0-1
ii  libpng12-0          1.2.49-3
ii  librsvg2-2          2.36.1-1
ii  libsm6              2:1.2.1-2
ii  libtiff4            3.9.6-9
ii  libtinfo5           5.9-10
ii  libx11-6            2:1.5.0-1
ii  libxft2             2.3.1-1
ii  libxpm4             1:3.5.10-1
ii  libxrender1         1:0.9.7-1
ii  zlib1g              1:1.2.7.dfsg-13

emacs23 recommends no packages.

Versions of packages emacs23 suggests:
ii  emacs23-common-non-dfsg  23.4+1-1

- -- no debconf information

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBCgAGBQJQfhmEAAoJEOx5ooBqGSMZGY8P/RiH4B1u/hxFAdk6o2FsDwsv
tmprJqI5APwCXZxe3gqiVRbX1gn3gQsKLwhuBpDf9risSsZOq6C8rl7g9b0M1xIB
fqtBeqZl7yB9fhO/IP6fXf6tv99w4xsKWnVOd0qGTTxBfC62WsT8Ha7UjA/YtJ7Y
8y9aixeN7e65xcztvzoEot43O7TqN1J8N5GFdtQjfrGUocJeWMcRjeIGB/gNMdW2
5zXaewSvlv542XI0TXyihuvSTar9Gx97SLe5aEYVAqkyN69eRXDCO9j2wK8XeNUo
ITIccm4FB8b66iSIW7j1jiKsHQFZmGkVG7JqUL5cwzgQGP5hPdN6VeEt0QBDad15
vTdrC1PPUJvU8ucUh8Zng5Sd83pAfSHNWa0GevV/QKJ4TpDEZ3xQ38CXb/RISdQF
CVbOeMYNP0qQ/+paMqzNxxnjPIcUM7rKSDaBV5SwMijx0AB117RJNHRQOEozhPJx
qZCLRTcgqSCtwzwzY11MurZ32Ax1fp8Kt2oO/Zc9b4XK3hAidieDkyOXk/G3D6po
5GRX9lbw1zsLM5Q852om90n9YqqNPIzALRVGSHNMg/LGSofHaiQpDqa6IGeL7Bpd
GHXusFP6zjEhT7E+C31CD8k8MJuVKbt50BM4eMyZmH1RIyeYxLeR+mfRbTqDb7O3
6UunPzxwouXAU1Xb6FoV
=HNNb
-----END PGP SIGNATURE-----
--- lisp/progmodes/python.el.old	2012-10-17 11:13:03.000000000 +0900
+++ lisp/progmodes/python.el	2012-10-17 11:11:48.000000000 +0900
@@ -86,6 +86,8 @@
 ;;;###autoload
 (add-to-list 'interpreter-mode-alist (cons (purecopy "python") 'python-mode))
 ;;;###autoload
+(add-to-list 'interpreter-mode-alist (cons (purecopy "python3") 'python-mode))
+;;;###autoload
 (add-to-list 'auto-mode-alist (cons (purecopy "\\.py\\'")  'python-mode))
 (add-to-list 'same-window-buffer-names (purecopy "*Python*"))
 

Reply via email to