From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: beginning-of-defun (again) Date: Thu, 29 Oct 2015 12:46:05 +0000 Message-ID: <20151029124605.GC2510@acm.fritz.box> References: <56320200.4050503@online.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1446122679 10257 80.91.229.3 (29 Oct 2015 12:44:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 29 Oct 2015 12:44:39 +0000 (UTC) Cc: emacs-devel@gnu.org To: Andreas =?iso-8859-1?Q?R=F6hler?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 29 13:44:31 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 1ZrmZC-0005w0-Jw for ged-emacs-devel@m.gmane.org; Thu, 29 Oct 2015 13:44:30 +0100 Original-Received: from localhost ([::1]:43838 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrmZB-0003gO-R5 for ged-emacs-devel@m.gmane.org; Thu, 29 Oct 2015 08:44:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56864) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrmZ8-0003gB-KN for emacs-devel@gnu.org; Thu, 29 Oct 2015 08:44:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZrmZ3-00067b-HR for emacs-devel@gnu.org; Thu, 29 Oct 2015 08:44:26 -0400 Original-Received: from mail.muc.de ([193.149.48.3]:51768) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrmZ3-00066S-7I for emacs-devel@gnu.org; Thu, 29 Oct 2015 08:44:21 -0400 Original-Received: (qmail 68424 invoked by uid 3782); 29 Oct 2015 12:44:20 -0000 Original-Received: from acm.muc.de (p548A58AB.dip0.t-ipconnect.de [84.138.88.171]) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 29 Oct 2015 13:44:19 +0100 Original-Received: (qmail 3130 invoked by uid 1000); 29 Oct 2015 12:46:05 -0000 Content-Disposition: inline In-Reply-To: <56320200.4050503@online.de> User-Agent: Mutt/1.5.23 (2014-03-12) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x X-Received-From: 193.149.48.3 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:192886 Archived-At: 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, 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? 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. > Cheers, > Andreas -- Alan Mackenzie (Nuremberg, Germany).