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: end-of-defun is fubsr. Date: Fri, 13 Feb 2009 18:57:56 +0000 Message-ID: <20090213185756.GD2975@muc.de> References: <20090204001445.GI1396@muc.de> <20090204133728.GB1049@muc.de> <20090204154427.GD1049@muc.de> <20090213110819.GA2975@muc.de> <20090213164210.GC2975@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1234550381 24495 80.91.229.12 (13 Feb 2009 18:39:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 13 Feb 2009 18:39:41 +0000 (UTC) Cc: Miles Bader , =?iso-8859-1?Q?R=F6hler?= , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 13 19:40:56 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 1LY2xz-0006ik-HJ for ged-emacs-devel@m.gmane.org; Fri, 13 Feb 2009 19:40:49 +0100 Original-Received: from localhost ([127.0.0.1]:49497 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LY2we-0000OJ-Gk for ged-emacs-devel@m.gmane.org; Fri, 13 Feb 2009 13:39:24 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LY2ub-00080c-EB for emacs-devel@gnu.org; Fri, 13 Feb 2009 13:37:17 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LY2uZ-0007zq-5u for emacs-devel@gnu.org; Fri, 13 Feb 2009 13:37:16 -0500 Original-Received: from [199.232.76.173] (port=32945 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LY2uY-0007zh-I1 for emacs-devel@gnu.org; Fri, 13 Feb 2009 13:37:14 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:2108 helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LY2uX-00037j-Se for emacs-devel@gnu.org; Fri, 13 Feb 2009 13:37:14 -0500 Original-Received: (qmail 34367 invoked by uid 3782); 13 Feb 2009 18:37:09 -0000 Original-Received: from acm.muc.de (pD9E23940.dip.t-dialin.net [217.226.57.64]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Fri, 13 Feb 2009 19:37:07 +0100 Original-Received: (qmail 11680 invoked by uid 1000); 13 Feb 2009 18:57:56 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-detected-operating-system: by monty-python.gnu.org: FreeBSD 4.6-4.9 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:109047 Archived-At: Hi, Stefan, On Fri, Feb 13, 2009 at 12:06:26PM -0500, Stefan Monnier wrote: > >> Did you notice any other problem? > > Well, the ones I pointed out before: > Great, thanks, Sorry, here's something a bit more constructive: ######################################################################### *** lisp.el~ 2009-02-12 12:10:53.000000000 +0000 --- lisp.el 2009-02-13 18:49:26.780916880 +0000 *************** *** 314,322 **** (defvar end-of-defun-function #'forward-sexp "Function for `end-of-defun' to call. ! This is used to find the end of the defun. ! It is called with no argument, right after calling `beginning-of-defun-raw'. ! So the function can assume that point is at the beginning of the defun body.") (defun buffer-end (arg) "Return the \"far end\" position of the buffer, in direction ARG. --- 314,326 ---- (defvar end-of-defun-function #'forward-sexp "Function for `end-of-defun' to call. ! This should move point to the next end of defun and return t on success, ! nil on failure. It should not move further forward into any whitespace or ! onto the next line. ! ! 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.") (defun buffer-end (arg) "Return the \"far end\" position of the buffer, in direction ARG. ######################################################################### 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? > Stefan -- Alan Mackenzie (Nuremberg, Germany).