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: Mon, 28 Sep 2009 00:06:45 -0400 Message-ID: References: <4ABE54F9.7090107@online.de> <4ABF3DCB.3060602@online.de> <1254050248.6168.30.camel@projectile.siege-engine.com> <1254082041.6168.65.camel@projectile.siege-engine.com> <1254103488.6168.152.camel@projectile.siege-engine.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1254110825 21856 80.91.229.12 (28 Sep 2009 04:07:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 28 Sep 2009 04:07:05 +0000 (UTC) Cc: emacs-devel@gnu.org, Andreas Roehler , XEmacs-Beta@xemacs.org To: eric@siege-engine.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 28 06:06:58 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 1Ms7Vp-0006lB-L0 for ged-emacs-devel@m.gmane.org; Mon, 28 Sep 2009 06:06:57 +0200 Original-Received: from localhost ([127.0.0.1]:56225 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ms7Vp-0005Zx-49 for ged-emacs-devel@m.gmane.org; Mon, 28 Sep 2009 00:06:57 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ms7Vk-0005Zs-PR for emacs-devel@gnu.org; Mon, 28 Sep 2009 00:06:52 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ms7Vg-0005Yv-8l for emacs-devel@gnu.org; Mon, 28 Sep 2009 00:06:52 -0400 Original-Received: from [199.232.76.173] (port=55393 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ms7Vg-0005Yr-59 for emacs-devel@gnu.org; Mon, 28 Sep 2009 00:06:48 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:36698 helo=ironport2-out.pppoe.ca) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ms7Vf-00067f-EG for emacs-devel@gnu.org; Mon, 28 Sep 2009 00:06:47 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvIEAI/Sv0pFxIo//2dsb2JhbACBUNEPhB4Fh30 X-IronPort-AV: E=Sophos;i="4.44,463,1249272000"; d="scan'208";a="46685789" Original-Received: from 69-196-138-63.dsl.teksavvy.com (HELO ceviche.home) ([69.196.138.63]) by ironport2-out.pppoe.ca with ESMTP; 28 Sep 2009 00:06:46 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 2E553B4228; Mon, 28 Sep 2009 00:06:46 -0400 (EDT) In-Reply-To: <1254103488.6168.152.camel@projectile.siege-engine.com> (Eric M. Ludlam's message of "Sun, 27 Sep 2009 22:04:48 -0400") 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:115708 gmane.emacs.xemacs.beta:30594 Archived-At: >> I can't think of a reason why #3 wouldn't want to be affected by #4. >> Note that for #2, it's not just the interactive form, since it also >> affects #3 (e.g. mark-defun, send-defun-to-inferior-process, younameit, >> ...). > Hmmm. A dilemma. Given this C code: I'm not sure what problem/dilemma you're alluding to. > Of course, perhaps I am wrong in thinking that stopping on 'int' is > preferred, but I do know it is preferred by me. Would this make the > CEDET behavior as found in 'senator' completely new in some way? I guess it would, but then again I have no idea why it would matter whether it's completely new or not (i.e. I don't understand what you're trying to say, I guess). >> What about programs that want to use CEDET but that also want to work >> when CEDET is not available? They would most likely want to use >> beginning-of-defun. > I had not contemplated this in the context of beginning-of-defun. > Ideally they would not need some if statement to deal with the issue. Exactly. > Of course, the need here would be pretty basic stuff too if it was > robust to the actual landing place being different for different > situations, sort of the way narrow-to-defun might not care exactly where > it lands, so long as it goes somewhere. Very much so, indeed. I'd say that pretty much all calls to beginning-of-defun(-raw) should follow this principle. Stefan