jed-users mailing list

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

Re: indenting problem


On Tue, May 06, 2003 at 10:05:51AM -0700, james broermann wrote:
... 
> If I pasted text that wasn't left justified into an xterm it would end up
> looking like this
> 
>  line one
>   line two
>    line three.
> 
> ^m was set to newline_and_indent I changed ^m to newline by adding this
> to .jedrc.
> 
> unsetkey("^M");
> setkey("newline", "^M");

However, this skips one of the nice features of jed: indenting a new line
according to the mode the buffer is in. There was a  less invasive solution
to the "insert from mouse in xterm" problem posted to this list once upon a
time (a search in the archives might help). My hack would be

define (newline_indent)
{
  if (input_pending(0))
     newline();
  else
     newline_and_indent();   
}

setkey("newline_indent", "^M");

This would diskriminate whether just the Enter key was pressed or the "^M"
comes from a longer input sequence (as e.g. a string inserted via the mouse).
(Untested. Might fail on slow terminal connections, with fast typing)

G|nter

-- 
Milde at ife.et.tu-dresden.de

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


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