emacs-devel
[Top][All Lists]
Advanced

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

Re: Syntactic fontification of diff hunks


From: Andreas Röhler
Subject: Re: Syntactic fontification of diff hunks
Date: Sat, 18 Aug 2018 22:02:29 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:52.0) Gecko/20100101 Thunderbird/52.9.1



On 17.08.2018 08:47, Yuri Khan wrote:
There is also the theoretical issue of syntax being changed by the
patch — e.g. introducing an unbalanced multiline string or comment
opener or closer on a separate line.

      (defun foo ()
     +  "
        (bar baz)
     +  "
        (quux xyzzy))

The middle line here has (punctuation identifier identifier
punctuation) syntax according to the “before” file, but (string)
according to “after”.

May go further saying: if a such a hunk contains valid syntax is not decidable. Because, even if it looks like, the impression might be wrong by missing syntactic context.




reply via email to

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