|
From: | Konstantin Kharlamov |
Subject: | Re: [PATCH 2/3] lisp/progmodes/etags.el don't (forward-char) as it's overriden next line |
Date: | Sun, 17 Mar 2019 23:44:28 +0300 |
В Вс, мар 17, 2019 at 11:40 ПП (PM), Eli Zaretskii <address@hidden> написал:
Date: Sun, 17 Mar 2019 23:27:30 +0300 From: Konstantin Kharlamov <address@hidden> Cc: address@hidden>> Okay, so: ^M appears in selective-display-mode only in the end of a>> line. >> No, ^M _replaces_ newline characters, so what was previously several> lines is now a single long line. Sure, but after the patch we don't match the whole line anymore. Weonly match the tag. We don't care if it's at the beginning of the line or in the middle of it. We only look for the tag. So we don't care ifline has a newline character or ^M.But that's incorrect: a tag in a tags table always begins at the beginning of a line, so it must be a search anchored at the beginning of the line. And in selective-display mode ^M counts as the beginning of a line.
Great, now that we established that part, to reply your question why we don't care about the beginnging of the line let me quote my other mail:
> The pattern that this functions searches for determines the tag uniquely. But here's a catch: no programming language creates distinc entities (ones that end up in the tag), based only on trailing space. I.e. "foo()" and " foo() " always refer to the same thing.
> > So this change gives 2 improvements:> 1. Emacs gonna stop failing finding a tag when someone simply reindented the sources > 2. As a side effect, this works around a problem, when a tags-generating program trimmed the whitespace (the commit has a link to anjuta-tags bugreport about that).
[Prev in Thread] | Current Thread | [Next in Thread] |