[Python-mode] M-x beginning-of-defun

Andreas Roehler andreas.roehler at online.de
Sat Nov 29 22:10:33 CET 2008


Barry Warsaw wrote:
> On Nov 29, 2008, at 12:02 PM, Andreas Roehler wrote:
> 
>> `beginning-of-defun-raw' in GNU Emacs has a nice
>> feature, enabling functions instead of regexps to
>> determine beginning and end of defun, i.e. function or form.
> 
>> In python-mode.el I see you solved this by binding the
>> beginning- and end-of-defun keys seperatly.
>> (Maybe, because XEmacs lacks this feature?)
> 
>> However, this lets commands like M-x beginning-of-defun
>> empty.
> 
>> My suggestion is to follow GNU conventions here, by
>> introducing the missing forms in XEmacs lisp.el and
>> python-mode.el alike.
> 
>> Herewith a patch against latest python-mode.el, which I
>> enjoy, thanks BTW.
> 
>> Also a patch against latest XEmacs lisp.el.
> 
> Thanks for the contribution Andreas, but I don't think we can accept a
> patch that relies on patching XEmacs.  

It doesn't rely on that lisp.el patch. It simply will not work with XEmacs,
i.e. in Xemacs everything will be unchanged,
whilst with GNU Emacs "M-x beginning-of-defun" etc. will work then.


I don't have the energy for
> that.  ;)

As the matter seems important, I'm rather confident to convince them.

As said, there is no restriction or bad thing for python-mode anyway.

OTOH should the lisp.el patch be applied, it offers some more chances to clean up the code,
using defaults instead of peciular solutions.

> 
> Can you rewrite the patch so that it doesn't rely on a XEmacs change? 

As mentioned above, no rewrite needed.

> Also, please open a bug on Launchpad and attach the patch to that, or
> create a branch with your changes that would be easy for us to review
> and merge.  

Ok, I'll try that.

Having patches sitting in an inbox is a surefire way to have
> it get lost.

Probably you are right, I understand that.

Thanks again.

Andreas

> 
> Thanks,
> Barry
> 


More information about the Python-mode mailing list