Commit dadcf339 authored by Mark Oteiza's avatar Mark Oteiza

Add prettify symbols to python-mode

lisp/progmodes/python.el (python-prettify-symbols-alist): New variable
lisp/progmodes/python.el (python-mode): Use it
parent dd1e6846
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment