emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] master 188f657: Fix false negatives in tex--prettify-s


From: Tassilo Horn
Subject: Re: [Emacs-diffs] master 188f657: Fix false negatives in tex--prettify-symbols-compose-p.
Date: Tue, 29 Sep 2015 14:31:01 +0200
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux)

Artur Malabarba <address@hidden> writes:

> Would it be possible to also use `tex--prettify-symbols-compose-p' to
> avoid composing the symbol-at-point? (perhaps by checking window-point
> or something). That would toggleable by a user-option, of course.

You mean, when point enters a prettified symbol the original text would
be shown?  Indeed, that sounds like a neat idea.  If I think about it, I
don't use prettification in LaTeX exactly because there are so many
prettified symbols which partly overlap and then editing becomes
cumbersome, e.g., when deleting a char from the prettified integral \int
you'll get the prettification of the set membership relation \in.

> Or maybe that feature should be implemented in `prettify-symbols-mode'
> itself.

Yes, I think the only thing to be done would be to change the

  (if (funcall prettify-symbols-compose-predicate start end match) ...

in `prettify-symbols--compose-symbol' to

  (if (and (or prettify-symbols-compose-at-point
               (< (window-point) start)
               (> (window-point) end))
           (funcall prettify-symbols-compose-predicate start end match)))

where `prettify-symbols-compose-at-point' would be the user option.

I'll try that out when I find some time.  If you want, you can of course
give it a shot yourself.

Bye,
Tassilo

> 2015-09-25 22:05 GMT+01:00 Tassilo Horn <address@hidden>:
>> branch: master
>> commit 188f657a827b04d72376f8b483c7d4b678e96fac
>> Author: Tassilo Horn <address@hidden>
>> Commit: Tassilo Horn <address@hidden>
>>
>>     Fix false negatives in tex--prettify-symbols-compose-p.
>>
>>     * lisp/textmodes/tex-mode.el (tex--prettify-symbols-compose-p): Fix some
>>     false negatives.



reply via email to

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