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: sh-script beg-end of function Date: Fri, 23 Nov 2007 11:34:29 -0500 Message-ID: References: <200711192143.15056.andreas.roehler@online.de> <200711221956.15254.andreas.roehler@online.de> <200711231633.37286.andreas.roehler@online.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1195835750 27261 80.91.229.12 (23 Nov 2007 16:35:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 23 Nov 2007 16:35:50 +0000 (UTC) Cc: Richard Stallman , 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 Fri Nov 23 17:35:55 2007 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 1IvbVP-0006XO-Cj for ged-emacs-devel@m.gmane.org; Fri, 23 Nov 2007 17:35:51 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IvbVA-00034d-R2 for ged-emacs-devel@m.gmane.org; Fri, 23 Nov 2007 11:35:36 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IvbUG-0002c4-2H for emacs-devel@gnu.org; Fri, 23 Nov 2007 11:34:40 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IvbUD-0002aw-Dk for emacs-devel@gnu.org; Fri, 23 Nov 2007 11:34:39 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IvbUD-0002ap-7b for emacs-devel@gnu.org; Fri, 23 Nov 2007 11:34:37 -0500 Original-Received: from tomts16.bellnexxia.net ([209.226.175.4] helo=tomts16-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IvbU7-0002pw-55; Fri, 23 Nov 2007 11:34:31 -0500 Original-Received: from pastel.home ([74.12.207.44]) by tomts16-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20071123163430.REOZ574.tomts16-srv.bellnexxia.net@pastel.home>; Fri, 23 Nov 2007 11:34:30 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id A62608197; Fri, 23 Nov 2007 11:34:29 -0500 (EST) In-Reply-To: <200711231633.37286.andreas.roehler@online.de> ("Andreas =?iso-8859-1?Q?R=F6hler=22's?= message of "Fri, 23 Nov 2007 16:33:36 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Solaris 8 (1) 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:83983 Archived-At: >> replacement should be at least as good. Most importantly: jumping to >> the end of a real function should jump to the closing "}". > Not, if exists usually no closing "}" while writing. I prefer to > set closings last and manually - the reports I get then > are more valuable than possible savings before. The case where a function is not yet completed is the rare exception and shouldn't drive the decision as to what the main behavior should be. > Here a small diff to enable modes to set beginning-of-defun-function without > disturbing each other: They can (and should/must) already do that by using `make-local-variable'. Grep for beginning-of-defun-function in lisp/**/*.el to see how other modes do it. >> - the docstring of `comment-beginning' says "Find the beginning of the >> enclosing comment" so I'm wondering why you decided to use that in >> a context where you have no idea whether or not you're inside >> a comment. Why don't you just use (forward-comment (- (point-max))) > Thanks. Simply wasn't aware of that. That's odd: seeing your posts on this list, you clearly spent a fair bit of time dealing with `comment-beginning': the first thing you should do in such a case is read its docstring. Again, please send your code as a *patch*. Stefan