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: Sat, 14 Feb 2009 23:25:35 +0000 Message-ID: <20090214232535.GA3623@muc.de> References: <20090204154427.GD1049@muc.de> <20090213110819.GA2975@muc.de> <20090213164210.GC2975@muc.de> <20090213185756.GD2975@muc.de> <20090214180030.GA4679@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1234652819 30028 80.91.229.12 (14 Feb 2009 23:06:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 14 Feb 2009 23:06:59 +0000 (UTC) Cc: Chong Yidong , 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 Sun Feb 15 00:08:13 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 1LYTcE-0000u4-6a for ged-emacs-devel@m.gmane.org; Sun, 15 Feb 2009 00:08:06 +0100 Original-Received: from localhost ([127.0.0.1]:46509 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LYTau-0000GZ-9C for ged-emacs-devel@m.gmane.org; Sat, 14 Feb 2009 18:06:44 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LYTYx-0007mm-Q9 for emacs-devel@gnu.org; Sat, 14 Feb 2009 18:04:43 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LYTYx-0007mD-2n for emacs-devel@gnu.org; Sat, 14 Feb 2009 18:04:43 -0500 Original-Received: from [199.232.76.173] (port=57687 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LYTYw-0007m2-QK for emacs-devel@gnu.org; Sat, 14 Feb 2009 18:04:42 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:2433 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 1LYTYw-0000qX-0I for emacs-devel@gnu.org; Sat, 14 Feb 2009 18:04:42 -0500 Original-Received: (qmail 80858 invoked by uid 3782); 14 Feb 2009 23:04:39 -0000 Original-Received: from acm.muc.de (pD9E2333E.dip.t-dialin.net [217.226.51.62]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Sun, 15 Feb 2009 00:04:37 +0100 Original-Received: (qmail 4350 invoked by uid 1000); 14 Feb 2009 23:25:35 -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:109081 Archived-At: Hi, Stefan, On Sat, Feb 14, 2009 at 04:16:53PM -0500, Stefan Monnier wrote: > >> I don't think the return result is ever used as of now. So I'd rather > >> not document such a thing. > > Emacs 22 and 21 end-of-defun return end-of-defun's result as > > EOD-function's own return value, even if it wasn't documented. It was documented, sort of, in that the `beginning-of-defun' documents its own return value, and `end-of-defun' says "see function `beginning-of-defun'". The doc-string of `end-of-defun' (very nearly) explicitly states that it is only for use in languages which have close parentheses at EODs. > It wasn't documented and should stay that way. > > We shouldn't change this, surely? > We have changed this. Should I put an entry into NEWS for it? > > How about this, then:? > I prefer the current text. Was my patch really that bad? Look, I'm as sick of all this as you must be. This whole area of beginning/end-of-defuns is riven with vagueness of documentation and inconsistencies between fine manuals and doc strings, between doc strings and code, between beginning- and end-. Defun movement commands are _important_ in major modes for programming languages. I have solid experience with writing and maintaining beginning/end-of-defun functions, and the frustration over several years of trying to link them smoothly into Emacs, something which should be utterly trivial, has been intense in the extreme. Basically, I've pretty much given up trying to hook in the CC Mode defun stuff. Not good. I won't say it's unusable to a major mode maintainer, because it clearly isn't. I will say that it's a wretched experience - you can't write B/EOD-functions without reading the fine source code in its finest detail, which for something which should be so easy, is lacking fun in the extreme. How about me collecting together the existing work, rendering it consistent, logical, backward compatible (in so far as that is possible), as usable as possible, sprucing up all the pertinent doc strings and manual pages, and submitting a patch for it to emacs-devel? > Stefan -- Alan Mackenzie (Nuremberg, Germany).