[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
cannot add \frownie to pretty-list
From: |
Uwe Brauer |
Subject: |
cannot add \frownie to pretty-list |
Date: |
Thu, 18 Nov 2021 17:55:56 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Hi all
I am using now emacs 29 master and enjoy Lars emoji insert menu.
So I thought why not adding emoji to the pretty-symbol list.
But this symbol seems to cause problems: ☹️.
Please consider this piece of code
(defun tex--prettify-symbols-compose-p (_start end _match) ; not necessary
(or (not (eq ?w (char-syntax (char-before end))))
(let* ((after-char (char-after end))
(after-syntax (char-syntax after-char)))
(not (or
;; Don't compose \alpha@foo.
(eq after-char ?@)
;; The \alpha in \alpha2 or \alpha-\beta may be composed but
;; of course \alphax may not.
(and (eq after-syntax ?w)
(not (memq after-char
'(?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9 ?+ ?- ?' ?\"))))
;; Don't compose inside verbatim blocks.
(eq 2 (nth 7 (syntax-ppss))))))))
(dolist (el '(
;; doble stack
("\\smiley" . ?🙂); works
("\\frowie" . ?☹️); gives error
("\\varrho" . ?ϱ)))
(add-to-list 'tex--prettify-symbols-alist el))
What is the problem?
Uwe Brauer
smime.p7s
Description: S/MIME cryptographic signature
- cannot add \frownie to pretty-list,
Uwe Brauer <=