jed-users mailing list

[2006 Date Index] [2006 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: how to indent a region multiple times in python-mode


On Mon, Sep 18, 2006 at 12:34:56PM +0200, G. Milde wrote:
> On 16.09.06, J?rg Sommer wrote:
> > Hello Joachim,
> > 
> > Joachim Schmitz <js@xxxxxxxxxxxxx> wrote:
> > > in python-mode I can indent a region for one tab, how to shift the 
> > > region multiple tabs ? 
> > 

[snip]

> As the attempt to unindent more that there is indentation could lead to ugly
> surprises (especially if unnoticed in a py_shift_region_left() operation, I
> changed the code to:
> 
>    define py_shift_line_left()
>    {
>       variable times = prefix_argument(1);
>       bol_skip_white();
>       if (what_column() < times * Py_Indent_Level)
>         verror("Line is less than %d columns indented", times * Py_Indent_Level);
>       push_mark();
>       goto_column(what_column() - times * Py_Indent_Level);
>       del_region();
>    }
>    
> This way the user is warned that something unintented happended and can look
> into the problem.

Gunter and Joerg -

Thanks for help with this problem.  I've got this working now in my
Jed python-mode.  I also did the dupmark() thing:

   dupmark();
   py_shift_region_left();

So, I've got what I want now.

Actually, I've now added the call to dupmark() to my pymode.sl.

I'd like to request that one or both of these solutions be added to
pymode.sl.

Thanks again.  Jed just keeps on getting better and better.

Dave

-- 
Dave Kuhlman
http://www.rexx.com/~dkuhlman

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2006 date index] [2006 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]