Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: abfbb4dee374689d4faf524d48fd4eea379e570d
Ticket: 1590790fffffffffffffffffffffffffffffffff
new [info call] command
User & Date: msofer on 2006-11-05 12:32:54
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    The idiom [uplevel 1 [info level 0]] fails to call the
    currently executing proc in some corner cases [Bug
    1590483]. Note that this can be fixed by letteing
    [interp alias] use fully qualified names.
    
    Should TIP 283 pass, the idiom breakage will be more
    widespread: it will not work at all for procs
    implementing ensemble subcommands, except in the rarest
    of occasions: the ensemble command is called from
    within the ensemble's namespace, or from a namespace
    that has the ensemble's in its resolution path (and is
    not shadowed).
    
    The attached patch provides a new [info call]
    subcommand that functions like [info level]. The
    difference between the two is that, when a command is
    rewritten prior to invocation (by an alias or
    ensemble), [info level n] returns the fully rewritten
    command (as invoked in the core), whereas [info call n]
    returns the original command as present in the source,
    after substitutions but before rewrites (as called by
    the user).
    
    This is useful for two reasons:
      - to provide a way to call the currently executing
    proc again, using [uplevel 1 [info call 0]]
      - to provide a way for procs to produce meaningful
    error reports that refer to what the user wrote
    
    
    
  4. foundin changed to: "None"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "msofer"
  10. subsystem changed to: "17. Commands I-L"
  11. title changed to: "new [info call] command"
  12. type changed to: "RFE"