Am 07.04.2011 20:40, schrieb Barry Warsaw:
On Apr 07, 2011, at 01:26 PM, Andreas Röhler wrote:

facing several difficulties with
beginning-of-defun-function, like to normalize
`py-beginning-of-def-or-class' taking just one argument
C-u.

That would help in many respects. I'm aware it
entangles precious heritages :-)

Default would be def-or-class, while C-u would mean `class-only'.

Unless you are vetoing...

There are a couple of things to consider.  First, the function is used both
interactively and programmatically.   It would probably be better in the long
run to split that into two different functions,

Hi,

that should be done already. We should have three different functions now:

beginning-of-def, -of-class, -of-def-or-class


 and if possible, retain the
second argument for the interactive use.  It doesn't seem like `count` is used
programmatically in python-mode.el.

AFAIK it's never been used, nor was it received by a form inside.


Second, TBH, I've never actually used the second argument myself.  Yes, I use
the `class` argument all the time.  So I *personally* don't mind if the second
argument goes away, but it might indeed be important to other users (who may
not be on this mailing list).


My concern was the `either', as beginning-of-defun expects a numeric argument.

Now the `t' in the cond delivers the same regexp as `either', ie the default when called without arg has changed.

That way its usable as beginning-of-defun-function - DTRT without argument.

Would assume, no one will notice the change, wanted to mention it nonetheless.

Cheers,

Andreas




Cheers,
-Barry

_______________________________________________
Python-mode mailing list
Python-mode@python.org
http://mail.python.org/mailman/listinfo/python-mode

Reply via email to