* Patch: external editor fix
@ 2000-12-06 16:43 Tom Tromey
2000-12-06 20:26 ` Syd Polk
0 siblings, 1 reply; 2+ messages in thread
From: Tom Tromey @ 2000-12-06 16:43 UTC (permalink / raw)
To: Insight List
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Patch: external editor fix
2000-12-06 16:43 Patch: external editor fix Tom Tromey
@ 2000-12-06 20:26 ` Syd Polk
0 siblings, 0 replies; 2+ messages in thread
From: Syd Polk @ 2000-12-06 20:26 UTC (permalink / raw)
To: tromey; +Cc: Insight List
Approved.
Tom Tromey wrote:
>
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-12-06 20:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-06 16:43 Patch: external editor fix Tom Tromey
2000-12-06 20:26 ` Syd Polk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).