]> code.delx.au - gnu-emacs/commit
python.el: Handle file encoding for shell.
authorFabián Ezequiel Gallina <fgallina@gnu.org>
Sat, 27 Dec 2014 04:30:21 +0000 (01:30 -0300)
committerFabián Ezequiel Gallina <fgallina@gnu.org>
Sat, 27 Dec 2014 04:30:21 +0000 (01:30 -0300)
commit2dd5163d764f395eb31a2306dba385d123af4aba
tree27b1ade1b6af5e984040a8acc840f81ee4f5adaa
parent7aa506eed8881788485a9774165454404bac2623
python.el: Handle file encoding for shell.

* lisp/progmodes/python.el (python-rx-constituents): Add coding-cookie.
(python-shell--save-temp-file): Write file with proper encoding.
(python-shell-buffer-substring): Add coding cookie for detected
encoding to generated content.  Fix blank lines when removing
if-name-main block.
(python-shell-send-file): Handle file encoding.
(python-info-encoding-from-cookie)
(python-info-encoding): New functions.

* test/automated/python-tests.el (python-shell-buffer-substring-1)
(python-shell-buffer-substring-2, python-shell-buffer-substring-3)
(python-shell-buffer-substring-4, python-shell-buffer-substring-5)
(python-shell-buffer-substring-6, python-shell-buffer-substring-7)
(python-shell-buffer-substring-8)
(python-info-encoding-from-cookie-1)
(python-info-encoding-from-cookie-2)
(python-info-encoding-from-cookie-3)
(python-info-encoding-from-cookie-4)
(python-info-encoding-from-cookie-5)
(python-info-encoding-from-cookie-6)
(python-info-encoding-from-cookie-7, python-info-encoding-1)
(python-info-encoding-2): New tests.
lisp/ChangeLog
lisp/progmodes/python.el
test/ChangeLog
test/automated/python-tests.el