Add a few tla symbols and load them to prettify them on command

- define some TLA+ symbols
- Use `M-x prettify-symbols-mode' to view them.
This commit is contained in:
Christian Barthel 2021-04-13 19:44:49 +02:00
parent 09941c5311
commit bf13ea44db
2 changed files with 39 additions and 0 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

After

Width:  |  Height:  |  Size: 157 KiB

View File

@ -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)