From andreas.roehler at online.de Sat Dec 29 06:01:33 2018 From: andreas.roehler at online.de (=?UTF-8?Q?Andreas_R=c3=b6hler?=) Date: Sat, 29 Dec 2018 12:01:33 +0100 Subject: [Python-mode] lean navigation Message-ID: <266412f7-4fe3-c457-b10d-7e673ebde0df@online.de> Hi all, when a class has a large amount of defs inside, jumping to the end of class might take some noticeable time. (Albeit don't see a bug report so far.) For now, navigating Python source internally is done by ?py-forward-statement? resp. ?py-backward-statement? - where ?statement? means just ?section of code starting at its own indent?. While this seems complete and reliable, it does several checks we might get rid off in certain circumstances when speed matters. For example when jumping to the end from a known block-start, may reason from the current indentation: any further start lesser/equal indented can't be part of. This makes some assumptions WRT formatting and might fail in case of uncommon or mixed formats using semicolons for example. As it's about an editor here and not about a lexer/parser IMO the change might be worth it. OTOH: how often exist these large classes? Maybe have a customizable boolean py-use-speed-navigation-p? Just a RFC, Cheers, Andreas -------------- next part -------------- An HTML attachment was scrubbed... URL: