From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: end-of-defun is fubsr. Date: Fri, 13 Feb 2009 23:22:48 -0500 Message-ID: References: <20090204001445.GI1396@muc.de> <20090204133728.GB1049@muc.de> <20090204154427.GD1049@muc.de> <20090213110819.GA2975@muc.de> <20090213164210.GC2975@muc.de> <20090213185756.GD2975@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1234585392 19136 80.91.229.12 (14 Feb 2009 04:23:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 14 Feb 2009 04:23:12 +0000 (UTC) Cc: Miles Bader , =?iso-8859-1?Q?R=F6hler?= , emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 14 05:24:27 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LYC4i-0005Bu-Oe for ged-emacs-devel@m.gmane.org; Sat, 14 Feb 2009 05:24:21 +0100 Original-Received: from localhost ([127.0.0.1]:58871 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LYC3O-00013Z-G2 for ged-emacs-devel@m.gmane.org; Fri, 13 Feb 2009 23:22:58 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LYC3J-00011Y-QO for emacs-devel@gnu.org; Fri, 13 Feb 2009 23:22:53 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LYC3I-0000zh-Qu for emacs-devel@gnu.org; Fri, 13 Feb 2009 23:22:53 -0500 Original-Received: from [199.232.76.173] (port=39724 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LYC3I-0000zJ-J2 for emacs-devel@gnu.org; Fri, 13 Feb 2009 23:22:52 -0500 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]:64528 helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LYC3H-000465-5z; Fri, 13 Feb 2009 23:22:51 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqYEAGzWlUlLd+Q0/2dsb2JhbACBbdA8hBwGgyw X-IronPort-AV: E=Sophos;i="4.38,205,1233550800"; d="scan'208";a="33877443" Original-Received: from 75-119-228-52.dsl.teksavvy.com (HELO pastel.home) ([75.119.228.52]) by ironport2-out.teksavvy.com with ESMTP; 13 Feb 2009 23:22:48 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 9DD8A84C5; Fri, 13 Feb 2009 23:22:48 -0500 (EST) In-Reply-To: <20090213185756.GD2975@muc.de> (Alan Mackenzie's message of "Fri, 13 Feb 2009 18:57:56 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:109059 Archived-At: > ! This should move point to the next end of defun I don't think it's quite true. It should really be "the end of the defun at point". There might be a nearer EOD in a nested function. > ! and return t on success, nil on failure. I don't think the return result is ever used as of now. So I'd rather not document such a thing. > ! It should not move further forward into any whitespace or > ! onto the next line. I used slightly different wording. > ! It is called with no argument. > ! The function can assume that point is at the beginning of a defun > ! body or before the first defun in the buffer.") I prefer to keep the reference to BOD-raw, which makes this starting position much more precise. > Another thing: in an elisp buffer, if (point-min) is in the middle of a > defun, C-M-e takes point to the next but one EOD. CC Mode is just as > bad. ;-) > Should end-of-defun perhaps widen the buffer around its machinations? Widening is not a good option, no. Rather we may want to consider what should happen if a file starts in the middle of a defun. I am not going to lose too much sleep over this. Stefan