diff options
| author | jave | 2015-01-02 16:30:55 +0100 |
|---|---|---|
| committer | jave | 2015-01-02 16:30:55 +0100 |
| commit | db4613576d3115aa320f0293d081ce98baa06acd (patch) | |
| tree | 829968643b451bd3f64c791e4d3a6c928010e14c /lisp/progmodes/python.el | |
| parent | c089503bac34376e75ae6f1d2c289fc8c9f42b8f (diff) | |
| parent | d0ca1148fe2d1e72e86f0197731071f139c143e3 (diff) | |
| download | emacs-db4613576d3115aa320f0293d081ce98baa06acd.tar.gz emacs-db4613576d3115aa320f0293d081ce98baa06acd.zip | |
merge master
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 10 |
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. |
| 4409 | Returns the enconding as a symbol." | 4409 | Returns 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. |
| 4424 | Try `python-info-encoding-from-cookie', if none is found then | 4424 | Try `python-info-encoding-from-cookie', if none is found then |
| 4425 | default to utf-8." | 4425 | default 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)) |