From: Mark Oteiza Date: Sun, 20 Sep 2015 19:20:36 +0000 (-0400) Subject: Add prettify symbols to python-mode X-Git-Tag: emacs-25.0.90~1224^2~63 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=dadcf33984391a285ef0b161c1122864264e4386;p=emacs.git Add prettify symbols to python-mode lisp/progmodes/python.el (python-prettify-symbols-alist): New variable lisp/progmodes/python.el (python-mode): Use it --- 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)