Change python function argument formating in Emacs -
i there way change python-mode indenting function args, instead of
urlpattrens = patterns('', view, name='view')
on enter key press formating following:
urlpattrens = patterns('', view, name='view')
?
after upcoming release of python-mode.el 6.1.2 introduction of indent-styles @ table.
see https://bugs.launchpad.net/python-mode/+bug/1197521
consider add request there.
for moment install macro correcting indent of first line "view," - afterwards indent should honored.
for curious hack indent-machine: here pseudo-code indicating entry-point:
+++ python-mode.el 2013-08-16 13:47:45.059486451 +0200 @@ -10859,7 +10859,10 @@ ((< (current-indentation) (current-column)) (+ (current-indentation) py-indent-offset)) (t (py-fetch-previous-indent orig))) - (cond ((looking-at "\\s([ \t]*$") + (cond ( + new_var_set + + (looking-at "\\s([ \t]*$") (py-empty-arglist-indent nesting py-indent-offset indent-offset)) ((looking-at "\\s([ \t]*\\([^ \t]+.*\\)$") (goto-char (match-beginning 1))
Comments
Post a Comment