This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch: external editor fix


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]