jed-users mailing list

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

Re: Jed Development


In message
<87B6D0A6B80ED311BF710008C7DAAACD08384A25@xxxxxxxxxxxxxxxxxxx>, SANGOI
DINO <SANGOID@xxxxxxxxxxxxxxxxx> writes
>This means that you have to know for what buffer you have changed TAB
>manually (this would mean a C code change), and let those unchanged, ad go
>through all the remaining buffers setting TAB = TAB_DEFAULT. You should keep
>in mind that a small limitation for you may be a big drawback for someone
>else. Adding features that in some way limit the user choice is a bad thing
>IMHO.

define eval_in_all_buffers()
{
    variable match = read_mini("buffer type regexp:", ".*", ".*");
    variable command = read_mini("command string", "", "");
    loop (buffer_list())
    {
        sw2buf( () );
        if (string_match( whatbuf(), match, 1 ) )
        {
            eval( command );
        }
    }
}

Then entering
  .*cpp
then
  TAB_DEFAULT=4;TAB=4
will change the setting on all *.cpp buffers. Seems to work... throw in
a gratuitous 'redraw()' if necessary.

Might mess up the window layout though ;)

-- 
Paul Shirley

--------------------------
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]