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:
parent
09941c5311
commit
bf13ea44db
Binary file not shown.
Before Width: | Height: | Size: 137 KiB After Width: | Height: | Size: 157 KiB |
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user