From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Aaron S. Hawley" Newsgroups: gmane.emacs.bugs Subject: bug#2379: [PATCH?] lisp.el: beginning-of-defun Date: Thu, 19 Feb 2009 23:27:33 -0500 Message-ID: References: Reply-To: "Aaron S. Hawley" , 2379@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1235105047 21551 80.91.229.12 (20 Feb 2009 04:44:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 20 Feb 2009 04:44:07 +0000 (UTC) Cc: 2379@emacsbugs.donarmstrong.com, bug-gnu-emacs@gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 20 05:45:23 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LaNGK-00053O-LJ for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Feb 2009 05:45:20 +0100 Original-Received: from localhost ([127.0.0.1]:35788 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LaNF0-0008QW-AP for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 Feb 2009 23:43:58 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LaNEj-0008EC-5N for bug-gnu-emacs@gnu.org; Thu, 19 Feb 2009 23:43:41 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LaNEh-0008DQ-MB for bug-gnu-emacs@gnu.org; Thu, 19 Feb 2009 23:43:40 -0500 Original-Received: from [199.232.76.173] (port=53882 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LaNEh-0008DM-IM for bug-gnu-emacs@gnu.org; Thu, 19 Feb 2009 23:43:39 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:40922) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LaNEg-0000L9-U8 for bug-gnu-emacs@gnu.org; Thu, 19 Feb 2009 23:43:39 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n1K4hZhv000865; Thu, 19 Feb 2009 20:43:36 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n1K4Z37T030777; Thu, 19 Feb 2009 20:35:03 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: "Aaron S. Hawley" Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 20 Feb 2009 04:35:03 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 2379 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.123510406129178 (code B ref -1); Fri, 20 Feb 2009 04:35:03 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 20 Feb 2009 04:27:41 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n1K4Rbra029166 for ; Thu, 19 Feb 2009 20:27:39 -0800 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LaMzB-0000xE-MD for bug-gnu-emacs@gnu.org; Thu, 19 Feb 2009 23:27:37 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LaMz9-0000x2-8e for bug-gnu-emacs@gnu.org; Thu, 19 Feb 2009 23:27:36 -0500 Original-Received: from [199.232.76.173] (port=60542 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LaMz9-0000wz-3Y for bug-gnu-emacs@gnu.org; Thu, 19 Feb 2009 23:27:35 -0500 Original-Received: from an-out-0708.google.com ([209.85.132.246]:38222) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LaMz8-0007RC-Ox for bug-gnu-emacs@gnu.org; Thu, 19 Feb 2009 23:27:34 -0500 Original-Received: by an-out-0708.google.com with SMTP id b6so311105ana.21 for ; Thu, 19 Feb 2009 20:27:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=N1KMIpHbrLhtWaDc9/2wsCxyz8UZhoLpz7voSPRZjCw=; b=QoKo9HOW+FZ3AQ7DiDHQSb/5JUDvo+01u4LleUibltVl/E16MEPyVyjxaxsAMqsKhm w61Vwee87oGLCIr6jlD9WD6E+u0ZIkH5sIGIijtU8Q+Y6euOIrlSB7Tj/2pFhuyCzTU5 AsBEyh3DgjFr0w7W1cewYp1izqUm9ALCYPyhI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=EJuNHGu6RRN75VX5n4widv4XHSoyI0K77T+li4FAjhGv4wbkRbBj5t1hgsTswM+CwP FfTizhpRU8cdX7e5dJ9n1ktEdDQMirKjoukQKcebNRQDxK4f1/0sqvANZuqxOK/6Lznz HUfNT9N9PLwCVoq3TM/SN8ZnWoq2inSA8P93k= Original-Received: by 10.100.125.12 with SMTP id x12mr651257anc.4.1235104053293; Thu, 19 Feb 2009 20:27:33 -0800 (PST) In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Thu, 19 Feb 2009 23:43:39 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:25497 Archived-At: Hey Stefan. Thanks for the reply. >> - (progn (goto-char (1- (match-end 0)))) t)) >> + (progn (goto-char (1- (match-end 0))) t))) > > I think that was the intention. Note that it turns out that the two > forms are equivalent in this context (because goto-char never returns > nil). Yes, I had noticed sloppy programming got lucky. > AFAICT, proper support for 0 would require a serious rethink of BOD's > semantics: currently if you're inside defun number N, then (BOD i) moves > to (N-(i-1)) is i is positive and to (N-i) if i is negative. I.e. it > moves to N if i=1 and to N+1 if i=-1, so where should 0 move to: there > is no other defun between those two. Fair enough. I notice that C-0 M-x end-of-defun is the same as just regular M-x end-of-defun. Also, It's worth citing beginning-of-line's behavior here, since it departs by moving in the oppisite direction -- N-1+i. Anyway, I'm just surprised this critical code for Lisp support is this sloppy. Cheers, /a