summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/progmodes/python.el8
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'."
((python-rx string-delimiter)
(0 (ignore (python-syntax-stringify))))))
+(defconst python--prettify-symbols-alist
+ '(("lambda" . ?\u03bb)
+ ("and" . ?\u2227)
+ ("or" . ?\u2228)))
+
(defsubst python-syntax-count-quotes (quote-char &optional point limit)
"Count number of quotes around point (max is 3).
QUOTE-CHAR is the quote char to count. Optional argument POINT is
@@ -5104,6 +5109,9 @@ returned as is."
"`outline-level' function for Python mode."
(1+ (/ (current-indentation) python-indent-offset))))
+ (set (make-local-variable 'prettify-symbols-alist)
+ python--prettify-symbols-alist)
+
(python-skeleton-add-menu-items)
(make-local-variable 'python-shell-internal-buffer)