Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add Emacs Unicode from lockywolf #51

Merged
merged 2 commits into from
Aug 17, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 35 additions & 2 deletions recipes/display-unicode-symbols-in-emacs.md
Original file line number Diff line number Diff line change
@@ -7,9 +7,11 @@ special Unicode characters like `λ` and `≥`.

## Solution

The following works in modern versions of GNU Emacs:
The following solutions work in modern versions of GNU Emacs.

```Emacs Lisp
### Arrows and lambda

```Emacs-Lisp
(defvar pretty-scheme-keywords
(mapcar (lambda (pair)
(cons (concat "\\(" (regexp-quote (car pair)) "\\)")
@@ -38,3 +40,34 @@ The following works in modern versions of GNU Emacs:
```

Credit: [Arthur A. Gleckler](https://speechcode.com/)

### APL-like characters

```Emacs-Lisp
(add-hook
'scheme-mode-hook
(lambda ()
(setq prettify-symbols-alist
(seq-concatenate
'list
'(("<=" . ?≤)
(">=" . ?≥)
("define" . ?≝)
("set!" . ?≐)
("set-car!" . ?≔)
("set-cdr!" . ?≕)
("#t" . ?✓)
("#f" . ?✗)
("'()" . ?∅)
("if" . ?⁇)
("or" . ?∨)
("and" . ?∧))
prettify-symbols-alist))))
```

Credit: [Vladimir Nikishkin](https://lockywolf.net/)

### Greek letters

A [`prettify-greek`](https://melpa.org/#/prettify-greek) package can
be installed from MELPA.