This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
Patch: external editor fix
- To: Insight List <insight at sourceware dot cygnus dot com>
- Subject: Patch: external editor fix
- From: Tom Tromey <tromey at redhat dot com>
- Date: 06 Dec 2000 17:55:17 -0700
- Reply-To: tromey at redhat dot com
Mo asked me to look at this.
The `external editor' feature (which, btw, isn't mentioned by `gdb
--help') doesn't work. The eval in the relevant method can't find the
procedure I supply. Evalling the command at the global level makes it
work for me.
Ok?
2000-12-06 Tom Tromey <tromey@redhat.com>
* srcwin.itb (SrcWin::edit): Use uplevel, not eval, to evaluate
external editor expression.
Tom
Index: srcwin.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/srcwin.itb,v
retrieving revision 1.4
diff -u -r1.4 srcwin.itb
--- srcwin.itb 2000/11/30 22:49:46 1.4
+++ srcwin.itb 2000/12/07 00:41:31
@@ -663,7 +667,7 @@
if {[info exists enable_external_editor] && $enable_external_editor} {
- if {[catch {eval $external_editor_command edit $loc_info} err]} {
+ if {[catch {uplevel \#0 "$external_editor_command edit $loc_info"} ]} {
tk_dialog .warn-sn "Edit" $err error 0 Ok
}
return