- Subject: Re: Re: diff.sl patch
- From: Guenter Milde <milde@xxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 21 Mar 2003 10:58:16 +0100 (CET)
On Wed, 4 Dec 2002 17:49:11 +0100 wrote SANGOI DINO <SANGOID@xxxxxxxxxxxxxxxxx>:
> Hi Guenter, jedders.
>
> Lately I have very little time to write slang code, this is why you don't
> read me often...
As you realize, I am also not in abundance of time... it took me months to
respond to your mode.
> So there is my current version. This has a lot of features, so consider it a
> "tecnology preview" (But as I said, I use this almost daily with only some
> minor glitches).
> the key features are:
> - Syntax highlighting, now with support for the new color objects in jed
> 0.9.16, but works also on older versions, using the "keyword[3-9]" hack.
> AFAICS, this is the first mode posted to this mailing list to take advantage
> of this new (and very cool) feature.
I will have to customize the colors a lot (they look awfull with my black on
light-yellow decent default). However, the custom_color commands will allow
this easily. (So maybe I am the first one to use them for custom colors :-)
> > go to the
> > cited lines in the original files (if present) from the diff output
>
> My version has it, using as always walk.sl (attached). The trick is done in
> diff_jump_to() function, so it should be very easy to change.
> The same applies to navigation between tree view and files, this time the
> funtion involved is difftree_goto_pos().
As always, I prefer the independent navigation functions from navigate.sl
(i.e. a common interface for all of the buffer history).
> Note
> also that the function diff_add_saurus_bindings() defines some bindings that
> you may not like. Use that function as a template for your own version (yes,
> I know that this shouldn't be there...).
IMO, it is ok, as long as this function is not activated by default...
As already with grep, I added a "call from within jed" feature, that makes
use of the filename-completion feature of jed:
autoload("popup_buffer", "bufutils"); % on jmr
autoload("diff_mode", "diffmode"); % or "diff", if you prefer the trad. one
custom_variable("Diff_Cmd", "diff -u"); % command for diff-s
public define diff() % (old, new)
{
variable old, new;
(old, new) = push_defaults( , , _NARGS);
variable prompt = sprintf("Compare (%s) ", Diff_Cmd);
if (old == NULL)
old = read_with_completion(prompt, "", "", 'f');
if (new == NULL)
new = read_with_completion(prompt + old + " to", "", "", 'f');
% Prepare the output buffer
setbuf("*diff*");
set_readonly(0);
erase_buffer();
% call the diff command
flush("calling " + Diff_Cmd);
shell_perform_cmd(strjoin([Diff_Cmd, old, new], " "), 1);
set_buffer_modified_flag(0);
popup_buffer();
diff_mode();
}
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]