diff --git a/examples/emacs-tlaplus.png b/examples/emacs-tlaplus.png index 4d5628d..2ce218a 100644 Binary files a/examples/emacs-tlaplus.png and b/examples/emacs-tlaplus.png differ diff --git a/lisp/tla+-mode.el b/lisp/tla+-mode.el index d991981..218bd54 100644 --- a/lisp/tla+-mode.el +++ b/lisp/tla+-mode.el @@ -1267,5 +1267,44 @@ The procedure works by: (use-local-map widget-keymap) (widget-setup))) + +(defun tla+/load-symbols () + "make some word or string show as pretty Unicode symbols" + (setq prettify-symbols-alist + '( + ("<" . ?<) + (">" . ?>) + ("<>" . ?◇) + ("<=" . ?≤) + ("\\leq" . ?≤) + ("\\geq" . ?≥) + (">=" . ?≥) + ("~>" . ?⇝) + ("\\E" . ?∃) + ("\\A" . ?∀) + ("\\cup" . ?∪) + ("\\union" . ?∪) + ("\\cap" . ?∩) + ("\\intersect" . ?∩) + ("\\in" . ?∈) + ("\\notin" . ?∉) + ("#" . ?≠) + ("/=" . ?≠) + ("<<" . ?⟨ ) + (">>" . ?⟩ ) + ("[]" . ?□) + ("\\equiv" . ?≡) + ("<=>" . ?≡) + ("/\\" . ?∧) + ("\\/" . ?∨) + ("=>" . ?⇒) ; ⇒ + ("==" . ?≜) + ("\\neg" . ?¬) + ("\\lnot" . ?¬) + ("\\neg" . ?¬) + ))) + +(add-hook 'tla+-mode-hook 'tla+/load-symbols) + (provide 'tla+-mode)