auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX-devel] modify or amplify tex--prettify-symbols-alist


From: Tassilo Horn
Subject: Re: [AUCTeX-devel] modify or amplify tex--prettify-symbols-alist
Date: Wed, 09 Sep 2015 11:06:30 +0200
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux)

Uwe Brauer <address@hidden> writes:

> In any case I got curious and thought of either appending the new
> commands as symbols to 
> tex--prettify-symbols-alist
>
> Like
>
> (add-to-list 'tex--prettify-symbols-alist
> '(("\\setN" . ?ℕ)
> ("\\setP" . ?ℙ) 
> ("\\setR" . ?ℝ)
> ("\\setZ" . ?ℤ)))

Well, `add-to-list' adds a single element to a list but you provide a
list of many elements which will be treated as one element and has the
wrong format then.

This works:

--8<---------------cut here---------------start------------->8---
(require 'tex-mode)
(dolist (el '(("\\setN" . ?ℕ)
              ("\\setP" . ?ℙ)
              ("\\setR" . ?ℝ)
              ("\\setZ" . ?ℤ)))
  (add-to-list 'tex--prettify-symbols-alist el))
--8<---------------cut here---------------end--------------->8---

> I cannot have 
>
> ("\\Bbb{R}" . ?ℝ)
> and
> ("\\setR" . ?ℝ)
>
> In the same list? So a list is really one-to-one?

No, it is an normal alist, so many-to-many with first one wins.

Bye,
Tassilo

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]