From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Andreas_R=c3=b6hler?= Newsgroups: gmane.emacs.devel Subject: Re: Python interactive navigation around nested functions Date: Tue, 21 Jun 2016 08:26:35 +0200 Message-ID: <5a22d44d-b7cb-0f9a-c3b6-9e0a41d2f1bf@online.de> References: <87lh21eq5c.fsf@secretsauce.net> <87eg7rdrj7.fsf@secretsauce.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1466490308 17293 80.91.229.3 (21 Jun 2016 06:25:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 21 Jun 2016 06:25:08 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 21 08:24:53 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bFF7E-0007wn-Rc for ged-emacs-devel@m.gmane.org; Tue, 21 Jun 2016 08:24:52 +0200 Original-Received: from localhost ([::1]:49106 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFF7E-00035u-1K for ged-emacs-devel@m.gmane.org; Tue, 21 Jun 2016 02:24:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40365) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFF4m-0000QU-2Q for emacs-devel@gnu.org; Tue, 21 Jun 2016 02:22:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFF4g-0002q6-R7 for emacs-devel@gnu.org; Tue, 21 Jun 2016 02:22:18 -0400 Original-Received: from mout.kundenserver.de ([217.72.192.73]:50886) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFF4g-0002q0-Gl for emacs-devel@gnu.org; Tue, 21 Jun 2016 02:22:14 -0400 Original-Received: from [192.168.178.35] ([77.12.1.85]) by mrelayeu.kundenserver.de (mreue101) with ESMTPSA (Nemesis) id 0Lu5Go-1bPWCZ1Sti-011Sl8 for ; Tue, 21 Jun 2016 08:22:13 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Icedove/45.1.0 In-Reply-To: <87eg7rdrj7.fsf@secretsauce.net> X-Provags-ID: V03:K0:Mu0rLQ3kptfd1Ib34G2V7TJcoryvAltBImMlPAtZDFIjfEHNfa6 2f2NUy1FWxhX5OlXqdYxtSFCJv44vdGn5lrNM3rYeQYrGfGHrSHmV6aYMCB6oCs0jygLpow 2SZs2wiVaWjKLerC42JA0jmA9xHXK/0+vMjeZzqbQ2VjJVvtlzlDhwULR2i1UnMrycwB9ZA hgN3OMqLeywRNNHTOVBIQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:4wsgHf/FEdI=:ft0T4F60WpSn5CRNWitbam iOAkA8l4k8VZjZ7zLxMEOzEf03+IwMwHK6uBPV1N4gbh8E9nJXZOSGOdTjBZybf5fVj/vdFWH oiWmrIk5bdayMKH4JGSZR+wOU6lpiiNvmTFPsHJzvkkKVYRzMtL4Y6lvM3awbSagzP4wVVwj9 hpoo1wMMcl5ZaWFgcEpFi96h8heJI2vKYYvFFWvNKRabm9Nhi0ArFMST5NqKOetiv5o8bB+gp kzD8iD8V2qbYQx80l1IL99/rkdJ4yeYn1tGLOxPGg1YrUZn62qacWLj4/NSR3b5LRzMoi0lQo 13GvpC0nKk+GLxeC/ZFXi3n8AeGa0KIijyAQdG5qGvW3+jCaV7BfNebNbRXiKu7KxRDWeb95c qeTLWpj1lnKrrzIIM29GOxSVniCysJSkLZ/LeZCz5Jb+eD7/UK2t0GtkEKTSxLLFw3FGpMmzU uT4GMeP8wiDyhHVji6opQysXyWVWQDUGfpClhLyvsz4cJinymO5U7fi1yyxK344njpzf8DqFP d+aiTA8xDOPLeT+d+E7F+jIUfUy2Tjo5P9BS8oqsDAxa6hoON/Mmd9E0AyGnk1tsRXmeLkSOP x4WctBiszT7RaXeFp8HTQ61AVUmBm2dE2y2WJPPNs02e+iYwqbnG+Te2/r8lW2HuVBdrvLd6u 1GzjTLqQJnhg2Ehs8NzHcE1B6nwcPTriVHTMI5Y2lD+tgLpLeqH0z8yZNrEokAVi+IXKA1CjB D5FUWN98vXaIRJuY X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 217.72.192.73 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:204633 Archived-At: On 21.06.2016 07:45, Dima Kogan wrote: > Stefan Monnier writes: > >>> def wwrap(f): >>> print 'Inside wwrap()' >>> def wrapped_f(*args): >>> print 'Inside wrapped_f()' >>> print 'Decorator arguments:', arg1, arg2, arg3 >>> f(*args) >>> print 'After f(*args)' >>> return wrapped_f >>> return wwrap >> >> Traditionally (IMO), C-M-a goes to the nearest beginning of defun at the >> same AST level or higher. So from "return wrapped_f", it seems reasonable >> to jump to "def wrapped_f(*args):". > Hmmm. That's not at all how I always thought this was supposed to work, > but I actually see this behavior in several modes across several > languages, Thats because of bugs in lisp mode WRT beginning-of-defun --cherished for decades-- it can't be done right that way. From there the bad manner might have expanded. Tried to fix that in lisp-mode here: https://github.com/andreas-roehler/werkstatt/blob/master/subroutines/gnu-emacs-fixes.el > so it looks like you're right. I don't really LIKE it, > though, so let me ponder. > > Thanks for setting me straight >