aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index c46c5d68019..1e8623dd901 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1,6 +1,6 @@
1;;; python.el --- Python's flying circus support for Emacs -*- lexical-binding: t -*- 1;;; python.el --- Python's flying circus support for Emacs -*- lexical-binding: t -*-
2 2
3;; Copyright (C) 2003-2014 Free Software Foundation, Inc. 3;; Copyright (C) 2003-2015 Free Software Foundation, Inc.
4 4
5;; Author: Fabián E. Gallina <fabian@anue.biz> 5;; Author: Fabián E. Gallina <fabian@anue.biz>
6;; URL: https://github.com/fgallina/python.el 6;; URL: https://github.com/fgallina/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))