From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel,gmane.emacs.xemacs.beta Subject: Re: simplifying beginning-of-defun Date: Sat, 26 Sep 2009 17:44:22 -0400 Message-ID: References: <4ABE54F9.7090107@online.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1254001483 12595 80.91.229.12 (26 Sep 2009 21:44:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 26 Sep 2009 21:44:43 +0000 (UTC) Cc: emacs-devel@gnu.org, XEmacs-Beta@xemacs.org To: Andreas Roehler Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 26 23:44:36 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 1Mrf4G-0002eX-02 for ged-emacs-devel@m.gmane.org; Sat, 26 Sep 2009 23:44:36 +0200 Original-Received: from localhost ([127.0.0.1]:57711 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mrf4F-0000OJ-2H for ged-emacs-devel@m.gmane.org; Sat, 26 Sep 2009 17:44:35 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mrf49-0000Nj-9c for emacs-devel@gnu.org; Sat, 26 Sep 2009 17:44:29 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mrf44-0000MK-CX for emacs-devel@gnu.org; Sat, 26 Sep 2009 17:44:28 -0400 Original-Received: from [199.232.76.173] (port=48517 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mrf44-0000MH-93 for emacs-devel@gnu.org; Sat, 26 Sep 2009 17:44:24 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:30852 helo=ironport2-out.pppoe.ca) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mrf43-0003Ik-TZ for emacs-devel@gnu.org; Sat, 26 Sep 2009 17:44:24 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnQFADoovkpFpYq6/2dsb2JhbACBUNIxhB4Fh30 X-IronPort-AV: E=Sophos;i="4.44,457,1249272000"; d="scan'208";a="46654925" Original-Received: from 69-165-138-186.dsl.teksavvy.com (HELO pastel.home) ([69.165.138.186]) by ironport2-out.pppoe.ca with ESMTP; 26 Sep 2009 17:44:22 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 7884580B1; Sat, 26 Sep 2009 17:44:22 -0400 (EDT) In-Reply-To: <4ABE54F9.7090107@online.de> (Andreas Roehler's message of "Sat, 26 Sep 2009 19:52:57 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (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:115678 gmane.emacs.xemacs.beta:30582 Archived-At: > simplifying forms as below should ease maintenance and speed up execution. To what extent does it preserve compatibility? Apparently it makes beginning-of-defun-raw ignore beginning-of-defun-function, and it calls end-of-defun-function with one argument contrary to the current situation where it's called without any argument. So your code wouldn't be acceptable as is since it would likely break several packages. Which performance problem is it trying to solve? The main difference I see between your beginning-of-defun and Emacs's one is that yours doesn't try to handle the case where beginning-of-defun-function, defun-prompt-regexp, and open-paren-in-column-0-is-defun-start and all nil. This case was added fairly recently (Emacs-22, IIRC) after a long discussion. I do not like this extra case at all, actually, but if you're trying to get rid of it, please make it a separate thread. In other words, if you send new code just to simplify the existing one, than make sure the incompatibilities are clearly understood and "minor". Otherwise, better focus on the proposal for the change in behavior, and then accompany that with a patch showing how you suggest to implement this change. Stefan