jed-users mailing list

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

Re: [Jed-users-l] key binding & arrow keys


On Sat 2011-07-23 (11:50), Mike Ma wrote:

> For change buffers quickly, a friend gives me:
> unsetkey ("\eOC");
> setkey ("next_buffer", "\eOC");
> It can bind right arrow to "next_buffer".

Great idea!


> Another question: Does jed have previous_buffer function? 

next_buffer() is in buf.sl, but there is no previous_buffer()

So I have modified next_buffer() to:

%!%+
%\function{previous_buffer}
%\synopsis{Cycle back through the list of buffers}
%\usage{Void previous_buffer ()}
%\description
%   Switches to the previous in the list of buffers.
%\seealso{next_buffer, buffer_list, list_buffers}
%!%-
public define previous_buffer() {
  variable n, buf, cbuf = whatbuf ();

  n = buffer_list();		    %/* buffers on stack */
  _stk_reverse(n);
  buf = ();
  n--;
  loop (n) {
    buf = ();
    n--;
    if (buf[0] == ' ') continue;    % hidden buffers like " <mini>"
    sw2buf(buf);
    _pop_n(n);
    return;
  }
}


-- 
Ullrich Horlacher              Server- und Arbeitsplatzsysteme
Rechenzentrum                  E-Mail: horlacher@xxxxxxxxxxxxxxxxxxxx
Universitaet Stuttgart         Tel:    ++49-711-685-65868
Allmandring 30                 Fax:    ++49-711-682357
70550 Stuttgart (Germany)      WWW:    http://www.rus.uni-stuttgart.de/
_______________________________________________
Jed-users-l mailing list
Jed-users-l@xxxxxxxx
http://mailman.jtan.com/mailman/listinfo/jed-users-l


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