auctex-devel
[Top][All Lists]
Advanced

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

Re: [AUCTeX-devel] more symbols in pretty


From: Uwe Brauer
Subject: Re: [AUCTeX-devel] more symbols in pretty
Date: Mon, 26 Oct 2015 13:26:33 +0200
User-agent: Gnus/5.13001 (Ma Gnus v0.10) Emacs/25.0.50 (gnu/linux)

> Uwe Brauer <address@hidden> writes:


> You could try this definition:

> (defun tex--prettify-symbols-compose-p (_start end _match)
>   (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 address@hidden
>             (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))))))))

> But I'm not sure if that has wicked side-effects.


I have tested it over a couple of days and enjoy it very much. I suggest
to include it. Did someone else test it?

Regards

Uwe Brauer 



reply via email to

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