From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Andreas_R=F6hler?= Newsgroups: gmane.emacs.devel Subject: Re: beginning-of-defun (again) Date: Thu, 29 Oct 2015 13:56:49 +0100 Message-ID: <56321791.8040809@online.de> References: <56320200.4050503@online.de> <20151029124605.GC2510@acm.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1446123417 22894 80.91.229.3 (29 Oct 2015 12:56:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 29 Oct 2015 12:56:57 +0000 (UTC) Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 29 13:56:48 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zrml5-0007MZ-8R for ged-emacs-devel@m.gmane.org; Thu, 29 Oct 2015 13:56:47 +0100 Original-Received: from localhost ([::1]:43893 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zrml4-0001j5-Sa for ged-emacs-devel@m.gmane.org; Thu, 29 Oct 2015 08:56:46 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59853) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zrmkq-0001iy-H9 for emacs-devel@gnu.org; Thu, 29 Oct 2015 08:56:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zrmkk-0000ni-SE for emacs-devel@gnu.org; Thu, 29 Oct 2015 08:56:32 -0400 Original-Received: from mout.kundenserver.de ([212.227.126.187]:51298) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zrmkk-0000nF-Mi for emacs-devel@gnu.org; Thu, 29 Oct 2015 08:56:26 -0400 Original-Received: from [192.168.178.31] ([77.12.74.197]) by mrelayeu.kundenserver.de (mreue002) with ESMTPSA (Nemesis) id 0LeUyk-1aGgtj2aTu-00qRIe; Thu, 29 Oct 2015 13:56:25 +0100 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4 In-Reply-To: <20151029124605.GC2510@acm.fritz.box> X-Provags-ID: V03:K0:juRVtVMODeBiB5g+P67npEn4N9oTRLlTL2ah7LGISomyPuqbDDY MRogMCdlMQHnvZRsRILeNqrt8mHVhwt1XjtCtRMSS+tKNyBHJ1IZrs4e1aIcLxmKLnjs520 g9l9aqNGYuaXfQOrSatYyC0IIP3Di3GnYxlDjPIs5TV5EynlX/Fswhp5xe6jmF+5X2S1Hbs 56oDL7It5N5YS7zEQrWZw== X-UI-Out-Filterresults: notjunk:1;V01:K0:v6HcIxhAB6U=:tdfPfQHVkUShgJQoo9KIEI nOf00FGVpDaHFwlXyYOrIqle6TX/tHsThFpBKMavZWxGXmL+7BgGEyAOe7AVaAIBrbxg++8tR WQy3/Hsa3e/bU/HfysJYqWqX51mKET5lUnBHmJd8JEB58dMDNCnBeZ8IczcUM3ItXTuBTfNEH cFpvwZrC8LfONym7lvDVzMHvNb4qs3GcFWs/+XHMQGAP/7hoN9TiKyUdE26npb+BTQbfeV6K/ C2GLoSJ125eXQjodASiwZiVi0eTs0nTtxuv/xd8isPH4aH7zHBACUtyEGwMaDxCe7OWUZ1kwi MHY7qevek9j/sy+U8Hdjza9tuTYq9K5IRHAJiqIRlkj/m/Asmg8sqhiOOvYnWSQV5a49wFEPr tG3uE2rKYbamd2FbXihE2vI3kUVYYHbGqBvkdKgE0oW30AE5397TF2jafO9C/aLXnsR2mCJZg LMtTrkXQ1maxT+WlV46kX3ArYz7znr8DD+5w1kDd86gyrEVeQ5MMY6zl2+Nj8b5rFJAGy/00c +ctUho0OgSycNPkXupUlZn8edQaq/pK2GIkkGpyhU/dowm0qpnfl9UOY1CBLW2BRtAR4rK2TR Ch9StGKl5hIXGxzv44OOjO735YxwCuUX6rIkO7frzKcla+79h+54H8ev5d0lxVnsnqHnl0XZz W10ZXMmRbJU8jRBSTDypALCtayBXHiX1WMtFo403oD0IGRNAJB0W5IOogjI4CtHnGYYEWw8oa /FNFYH/aindzq3Ob X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.126.187 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:192888 Archived-At: On 29.10.2015 13:46, Alan Mackenzie wrote: > Hello, Andreas. > > On Thu, Oct 29, 2015 at 12:24:48PM +0100, Andreas Röhler wrote: >> Hi guys, >> maybe it's time to have a reasonable default-behavior of >> beginning-of-defun in Emacs Lisp. >> IMO there is no reason for stuff like >> open-paren-in-column-0-is-defun-start > Unfortunately, there is. Setting it to nil ensures accurate recognition > of non-nested parens, Sorry, Alan, but if there is no syntax expecting a start in column 0, there is no reason to assume that. Relying on such means working in some cases, in other not. You won't want that. > though this can be slow, sometimes very slow. > Setting it to non-nil makes it fast, but sometimes so inaccurate it > looks like a bug. > >> A function resp. top-level-form starts if the beginning of a list is >> followed by a respective keyword. > Not necessarily: how does Emacs know whether something looking like a > "top-level-form" is actually at the top level or not? Top-level here is the beginning of a not nested list. Remains to set the keywords more or less restrictive. > When > open-paren-in-column-0-is-defun-start is non-nil, it need scan no > further back than the first such paren encountered. When > o-p-i-c-0-i-d-s is nil, it must scan all the way from the beginning of > the file. > >> The list of keywords being customizable seems a plus :) > This would not work in all modes. > The default can't work in all modes but be reliable in Emacs Lisp.