[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX-devel] more symbols in pretty
From: |
Tassilo Horn |
Subject: |
Re: [AUCTeX-devel] more symbols in pretty |
Date: |
Wed, 28 Oct 2015 08:51:40 +0100 |
User-agent: |
Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux) |
Uwe Brauer <address@hidden> writes:
Hi Uwe,
>> 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?
Yes, I tested it, too, and just now I've committed it on the Emacs
master branch.
Bye,
Tassilo