Ignore:
Timestamp:
Jan 9, 2005, 10:27:48 AM (14 years ago)
Author:
pguyot (Paul Guyot)
Message:

Silently accept
my_option-delete foo

if my_option wasn't defined yet.

This can be useful in the following test case:
my_option foo

variant bar {

my_option-delete foo

}

variant foobar {

my_option-delete foo

}

First delete unset the option. Second delete previously failed and now, no
longer fails.

Thanks James. Sorry to have been so long to find a valid test case.

Bug: #1661
Submitted by: jberry@
Reviewed by:
Approved by:
Obtained from:

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port1.0/portutil.tcl

    r9818 r10292  
    108108        eval "proc ${option}-delete {args} \{ \n\
    109109            global ${option} user_options option_procs \n\
    110                 \if \{!\[info exists user_options(${option})\]\} \{ \n\
     110                \if \{!\[info exists user_options(${option})\]\ && \[info exists ${option}\]\} \{ \n\
    111111                    foreach val \$args \{ \n\
    112112                       set ${option} \[ldelete \$\{$option\} \$val\] \n\
Note: See TracChangeset for help on using the changeset viewer.