aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorPaul Eggert2015-01-01 10:47:17 -0800
committerPaul Eggert2015-01-01 10:47:17 -0800
commit6ddd819467d1d9d0e78f13e5a15c1af9125ae67b (patch)
treebb6782a87dc52bed05166ac4ae458998c3418e70 /lisp/progmodes/python.el
parent935fa6151b3e411c5308d62338744ff25f1a8ddb (diff)
parenta5f90a37622e9d0cb066da413846c1c3f6900b51 (diff)
downloademacs-6ddd819467d1d9d0e78f13e5a15c1af9125ae67b.tar.gz
emacs-6ddd819467d1d9d0e78f13e5a15c1af9125ae67b.zip
Merge from origin/emacs-24
a5f90a3 * .gitattributes: New file. 5a9710f Make sure tool-bar changes are reflected on display. 93796ba * autogen.sh: Port better to non-GNU 'cp'. 9758516 Fix a typo in a comment in the previous commit. aa472a3 Fix the pixel coordinates returned by pos-visible-in-window-p. (Bug#19473) d261229 * automated/tramp-tests.el (tramp--test-smb-or-windows-nt-p): New defun. (tramp-test30-special-characters): Use it. (tramp--test-check-files): Filter nil file names out. 9278f05 Omit trailing white space 1c93fd3 Sync with Tramp 2.2.11. 96ebe18 Sync with Tramp 2.2.11. e792450 Sync with Tramp 2.2.11. 2d17e12 Fix ChangeLog entry. 6444482 Fix auto-revert-tail-mode for remote files b5c9c13 Spelling fixes c5504d1 src/w32proc.c (Fw32_get_codepage_charset): Doc fix. (Bug#19458) Conflicts: ChangeLog doc/misc/ChangeLog lisp/ChangeLog src/ChangeLog test/ChangeLog
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index c46c5d68019..a1ef9a6fca2 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -2767,7 +2767,7 @@ the python shell:
2767 (concat 2767 (concat
2768 (format "# -*- coding: %s -*-\n" encoding) 2768 (format "# -*- coding: %s -*-\n" encoding)
2769 (make-string 2769 (make-string
2770 ;; Substract 2 because of the coding cookie. 2770 ;; Subtract 2 because of the coding cookie.
2771 (- (line-number-at-pos start) 2) ?\n)))) 2771 (- (line-number-at-pos start) 2) ?\n))))
2772 (toplevel-block-p (save-excursion 2772 (toplevel-block-p (save-excursion
2773 (goto-char start) 2773 (goto-char start)
@@ -4406,7 +4406,7 @@ operator."
4406 4406
4407(defun python-info-encoding-from-cookie () 4407(defun python-info-encoding-from-cookie ()
4408 "Detect current buffer's encoding from its coding cookie. 4408 "Detect current buffer's encoding from its coding cookie.
4409Returns the enconding as a symbol." 4409Returns the encoding as a symbol."
4410 (let ((first-two-lines 4410 (let ((first-two-lines
4411 (save-excursion 4411 (save-excursion
4412 (save-restriction 4412 (save-restriction
@@ -4423,9 +4423,9 @@ Returns the enconding as a symbol."
4423 "Return encoding for file. 4423 "Return encoding for file.
4424Try `python-info-encoding-from-cookie', if none is found then 4424Try `python-info-encoding-from-cookie', if none is found then
4425default to utf-8." 4425default to utf-8."
4426 ;; If no enconding is defined, then it's safe to use UTF-8: Python 2 4426 ;; If no encoding is defined, then it's safe to use UTF-8: Python 2
4427 ;; uses ASCII as default while Python 3 uses UTF-8. This means that 4427 ;; uses ASCII as default while Python 3 uses UTF-8. This means that
4428 ;; in the worst case escenario python.el will make things work for 4428 ;; in the worst case scenario python.el will make things work for
4429 ;; Python 2 files with unicode data and no encoding defined. 4429 ;; Python 2 files with unicode data and no encoding defined.
4430 (or (python-info-encoding-from-cookie) 4430 (or (python-info-encoding-from-cookie)
4431 'utf-8)) 4431 'utf-8))