diff options
| author | Mark Oteiza | 2015-09-20 15:20:36 -0400 |
|---|---|---|
| committer | Mark Oteiza | 2015-09-20 22:39:35 -0400 |
| commit | dadcf33984391a285ef0b161c1122864264e4386 (patch) | |
| tree | aa2f6e174c6205496edbbadf571cb35f7793ce3a /lisp/progmodes/python.el | |
| parent | dd1e6846198e559b1c2ca321a1e6f8b05945fd66 (diff) | |
| download | emacs-dadcf33984391a285ef0b161c1122864264e4386.tar.gz emacs-dadcf33984391a285ef0b161c1122864264e4386.zip | |
Add prettify symbols to python-mode
lisp/progmodes/python.el (python-prettify-symbols-alist): New variable
lisp/progmodes/python.el (python-mode): Use it
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 243125e310c..4fdf2ca8542 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -620,6 +620,11 @@ The type returned can be `comment', `string' or `paren'." | |||
| 620 | ((python-rx string-delimiter) | 620 | ((python-rx string-delimiter) |
| 621 | (0 (ignore (python-syntax-stringify)))))) | 621 | (0 (ignore (python-syntax-stringify)))))) |
| 622 | 622 | ||
| 623 | (defconst python--prettify-symbols-alist | ||
| 624 | '(("lambda" . ?\u03bb) | ||
| 625 | ("and" . ?\u2227) | ||
| 626 | ("or" . ?\u2228))) | ||
| 627 | |||
| 623 | (defsubst python-syntax-count-quotes (quote-char &optional point limit) | 628 | (defsubst python-syntax-count-quotes (quote-char &optional point limit) |
| 624 | "Count number of quotes around point (max is 3). | 629 | "Count number of quotes around point (max is 3). |
| 625 | QUOTE-CHAR is the quote char to count. Optional argument POINT is | 630 | QUOTE-CHAR is the quote char to count. Optional argument POINT is |
| @@ -5104,6 +5109,9 @@ returned as is." | |||
| 5104 | "`outline-level' function for Python mode." | 5109 | "`outline-level' function for Python mode." |
| 5105 | (1+ (/ (current-indentation) python-indent-offset)))) | 5110 | (1+ (/ (current-indentation) python-indent-offset)))) |
| 5106 | 5111 | ||
| 5112 | (set (make-local-variable 'prettify-symbols-alist) | ||
| 5113 | python--prettify-symbols-alist) | ||
| 5114 | |||
| 5107 | (python-skeleton-add-menu-items) | 5115 | (python-skeleton-add-menu-items) |
| 5108 | 5116 | ||
| 5109 | (make-local-variable 'python-shell-internal-buffer) | 5117 | (make-local-variable 'python-shell-internal-buffer) |