|
From: | Andreas Röhler |
Subject: | Re: beginning-of-defun (again) |
Date: | Sat, 31 Oct 2015 16:55:11 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4 |
On 31.10.2015 13:24, David Kastrup wrote:
Andreas Röhler<address@hidden> writes:On 31.10.2015 00:14, Richard Stallman wrote:[[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > With emacs -Q, C-M-a from behind example below, stops at "(bar)", > missing the beginning of function. > (defun foo () > (insert " > (bar)")) Our convention is that you should write it this way: (defun foo () (insert " \(bar)"))A convention which probably predates Aristoteles :) Working-by-convention is rather a social thing... That design was a real nuisance when generating and writing functions on the fly. Sure, it's possible to live with it. But why not remove that constraint, if possible?Because reparsing every file from its beginning in order to indent the current line is too expensive for large files?
Delivered some benchmark showing a reliable solution must not be slower.
The meaning of every Lisp file can be changed by putting (setq everything " at its beginning. There really is no correct way to determine current state apart from parsing from the start. So we have a convention for an "incorrect way" of avoiding parsing from the start.
With the side-effect of creating a certain number of bugs - which are already inside, but not reported, because "configure..." would be the answer.
The current buggy behavior detects beginning-of-defun inside a string - which is not to cure by conventions.
[Prev in Thread] | Current Thread | [Next in Thread] |