Skip to content

Commit 5354116

Browse files
committed
Clarify {try,any}_modulefile state in ml proc
Clarify that the try_modulefile and any_modulefile states cannot be enabled when set through the ml procedure: ml shortcut syntax leads to regular load and not load-any or try-load.
1 parent ed9b931 commit 5354116

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tcl/main.tcl.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -813,10 +813,10 @@ proc ml {args} {
813813
# define if modfile should always be fully read even for validity check
814814
lappendState always_read_full_file 1
815815
lappendState commandname ml
816-
# is evaluation a regular attempt or a try (silence not found error)
817-
lappendState try_modulefile [expr {$command in {try-load load-any}}]
818-
# stop evaluation after first successful load
819-
lappendState any_modulefile [expr {$command eq {load-any}}]
816+
# initialize try and any load states: as the load/unload shortcut is
817+
# analyzed in this branch, no try-load/load-any command can occur
818+
lappendState try_modulefile 0
819+
lappendState any_modulefile 0
820820

821821
# Find and execute any global rc file found
822822
runModulerc

0 commit comments

Comments
 (0)