︙ | | | ︙ | |
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
|
}
set range {}
if {[info exists ::eskil($top,range)] && \
[llength $::eskil($top,range)] == 4} {
set range $::eskil($top,range)
lappend opts -range $range
}
if {[llength $Pref(regsub)] > 0} {
lappend opts -regsub $Pref(regsub)
}
# Apply nodigit after preprocess
if {$Pref(nodigit)} {lappend opts -nodigit}
# If a special file for diffing is present, use it.
if {[info exists ::eskil($top,leftFileDiff)]} {
set dFile1 $::eskil($top,leftFileDiff)
|
|
|
|
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
|
}
set range {}
if {[info exists ::eskil($top,range)] && \
[llength $::eskil($top,range)] == 4} {
set range $::eskil($top,range)
lappend opts -range $range
}
foreach {RE sub side} $Pref(preprocess) {
lappend opts -regsub$side [list $RE $sub]
}
# Apply nodigit after preprocess
if {$Pref(nodigit)} {lappend opts -nodigit}
# If a special file for diffing is present, use it.
if {[info exists ::eskil($top,leftFileDiff)]} {
set dFile1 $::eskil($top,leftFileDiff)
|
︙ | | | ︙ | |
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
|
grid columnconfigure .fo 0 -weight 1
grid rowconfigure .fo 1 -weight 1
exampleFont $lb
}
###########################
# Editor for ::Pref(regsub)
###########################
proc EditPrefRegsubOk {top w} {
set exa $::eskil($top,prefregexa)
set result {}
for {set t 1} {[info exists ::eskil($top,prefregexp$t)]} {incr t} {
set RE $::eskil($top,prefregexp$t)
set Sub $::eskil($top,prefregsub$t)
if {$RE eq ""} continue
if {[catch {regsub -all -- $RE $exa $Sub _} err]} {
return
}
lappend result $RE $Sub
}
set ::Pref(regsub) $result
destroy $w
array unset ::eskil $top,prefregexp*
array unset ::eskil $top,prefregsub*
}
proc EditPrefRegsubUpdate {top args} {
set exa $::eskil($top,prefregexa)
set exa2 $::eskil($top,prefregexa2)
set ok $::widgets($top,prefRegsubOk)
for {set t 1} {[info exists ::eskil($top,prefregexp$t)]} {incr t} {
set RE $::eskil($top,prefregexp$t)
set Sub $::eskil($top,prefregsub$t)
if {$RE eq ""} continue
if {[catch {regsub -all -- $RE $exa $Sub result} err]} {
set ::eskil($top,prefregresult) "$t ERROR: $err"
$ok configure -state disabled
return
} else {
set exa $result
}
if {[catch {regsub -all -- $RE $exa2 $Sub result} err]} {
set ::eskil($top,prefregresult2) "$t ERROR: $err"
$ok configure -state disabled
return
} else {
set exa2 $result
}
}
set ::eskil($top,prefregresult2) $exa2
set ::eskil($top,prefregresult) $exa
$ok configure -state normal
}
proc AddPrefRegsub {top parent} {
for {set t 1} {[winfo exists $parent.fr$t]} {incr t} {
#Empty
}
set w [ttk::frame $parent.fr$t -borderwidth 2 -relief groove -padding 3]
ttk::label $w.l1 -text "Regexp:" -anchor "w"
ttk::entryX $w.e1 -textvariable ::eskil($top,prefregexp$t) -width 60
ttk::label $w.l2 -text "Subst:" -anchor "w"
ttk::entryX $w.e2 -textvariable ::eskil($top,prefregsub$t)
grid $w.l1 $w.e1 -sticky we -padx 3 -pady 3
grid $w.l2 $w.e2 -sticky we -padx 3 -pady 3
grid columnconfigure $w 1 -weight 1
pack $w -side "top" -fill x -padx 3 -pady 3
trace add variable ::eskil($top,prefregexp$t) write \
[list EditPrefRegsubUpdate $top]
trace add variable ::eskil($top,prefregsub$t) write \
[list EditPrefRegsubUpdate $top]
}
# Editor for ::Pref(regsub)
proc EditPrefRegsub {top} {
set w $top.prefregsub
if {[winfo exists $w] && [winfo toplevel $w] eq $w} {
wm deiconify $w
raise $w
focus $w
|
|
>
>
|
>
>
>
>
>
>
>
|
|
>
>
>
>
|
>
|
>
>
>
>
>
|
|
|
>
|
|
|
|
|
|
|
>
|
|
|
|
|
>
>
|
>
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
>
>
>
>
|
|
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
|
grid columnconfigure .fo 0 -weight 1
grid rowconfigure .fo 1 -weight 1
exampleFont $lb
}
###########################
# Editor for ::Pref(preprocess)
###########################
# This is called when Ok or Apply is pressed.
# Update preference from dialog contents.
proc EditPrefRegsubOk {top w {keep 0}} {
set exa $::eskil($top,prefregexa)
set result {}
for {set t 1} {[info exists ::eskil($top,prefregexp$t)]} {incr t} {
set RE $::eskil($top,prefregexp$t)
set Sub $::eskil($top,prefregsub$t)
set l $::eskil($top,prefregleft$t)
set r $::eskil($top,prefregright$t)
set side ""
if {$l && !$r} { set side left }
if {!$l && $r} { set side right }
if {!$l && !$r} { continue }
if {$RE eq ""} continue
if {[catch {regsub -all -- $RE $exa $Sub _} err]} {
return
}
lappend result $RE $Sub $side
}
set ::Pref(preprocess) $result
if {$keep} return
destroy $w
array unset ::eskil $top,prefregexp*
array unset ::eskil $top,prefregsub*
array unset ::eskil $top,prefregleft*
array unset ::eskil $top,prefregright*
}
# Update the example in the preprocess dialog
proc EditPrefRegsubUpdate {top args} {
set exal $::eskil($top,prefregexa)
set exar $::eskil($top,prefregexa)
set exal2 $::eskil($top,prefregexa2)
set exar2 $::eskil($top,prefregexa2)
set ok $::widgets($top,prefRegsubOk)
set app $::widgets($top,prefRegsubApply)
for {set t 1} {[info exists ::eskil($top,prefregexp$t)]} {incr t} {
set RE $::eskil($top,prefregexp$t)
set Sub $::eskil($top,prefregsub$t)
set l $::eskil($top,prefregleft$t)
set r $::eskil($top,prefregright$t)
if {$RE eq ""} continue
if {$l} {
if {[catch {regsub -all -- $RE $exal $Sub result} err]} {
set ::eskil($top,prefregresultl) "$t ERROR: $err"
$ok configure -state disabled
$app configure -state disabled
return
} else {
set exal $result
}
if {[catch {regsub -all -- $RE $exal2 $Sub result} err]} {
set ::eskil($top,prefregresultl2) "$t ERROR: $err"
$ok configure -state disabled
$app configure -state disabled
return
} else {
set exal2 $result
}
}
if {$r} {
if {[catch {regsub -all -- $RE $exar $Sub result} err]} {
set ::eskil($top,prefregresultr) "$t ERROR: $err"
$ok configure -state disabled
$app configure -state disabled
return
} else {
set exar $result
}
if {[catch {regsub -all -- $RE $exar2 $Sub result} err]} {
set ::eskil($top,prefregresultr2) "$t ERROR: $err"
$ok configure -state disabled
$app configure -state disabled
return
} else {
set exar2 $result
}
}
}
set ::eskil($top,prefregresultl2) $exal2
set ::eskil($top,prefregresultr2) $exar2
set ::eskil($top,prefregresultl) $exal
set ::eskil($top,prefregresultr) $exar
$ok configure -state normal
$app configure -state normal
}
# Add a new entry in the preprocess dialog
proc AddPrefRegsub {top parent} {
# Figure out next number to use
for {set t 1} {[winfo exists $parent.fr$t]} {incr t} {
#Empty
}
# Default values
if {![info exists ::eskil($top,prefregexp$t)]} {
set ::eskil($top,prefregexp$t) ""
set ::eskil($top,prefregsub$t) ""
set ::eskil($top,prefregleft$t) 1
set ::eskil($top,prefregright$t) 1
}
set w [ttk::frame $parent.fr$t -borderwidth 2 -relief groove -padding 3]
ttk::label $w.l1 -text "Regexp:" -anchor "w"
ttk::entryX $w.e1 -textvariable ::eskil($top,prefregexp$t) -width 60
ttk::label $w.l2 -text "Subst:" -anchor "w"
ttk::entryX $w.e2 -textvariable ::eskil($top,prefregsub$t)
ttk::checkbutton $w.cb1 -text "Left" -variable ::eskil($top,prefregleft$t)
ttk::checkbutton $w.cb2 -text "Right" -variable ::eskil($top,prefregright$t)
addBalloon $w.cb1 "Apply to left file"
addBalloon $w.cb2 "Apply to right file"
grid $w.l1 $w.e1 $w.cb1 -sticky we -padx 3 -pady 3
grid $w.l2 $w.e2 $w.cb2 -sticky we -padx 3 -pady 3
grid columnconfigure $w 1 -weight 1
pack $w -side "top" -fill x -padx 3 -pady 3
trace add variable ::eskil($top,prefregexp$t) write \
[list EditPrefRegsubUpdate $top]
trace add variable ::eskil($top,prefregsub$t) write \
[list EditPrefRegsubUpdate $top]
trace add variable ::eskil($top,prefregleft$t) write \
[list EditPrefRegsubUpdate $top]
trace add variable ::eskil($top,prefregright$t) write \
[list EditPrefRegsubUpdate $top]
}
# Editor for ::Pref(preprocess)
proc EditPrefRegsub {top} {
set w $top.prefregsub
if {[winfo exists $w] && [winfo toplevel $w] eq $w} {
wm deiconify $w
raise $w
focus $w
|
︙ | | | ︙ | |
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
|
set ::eskil($top,prefregexa2) \
"An example TextString FOR_REGSUB /* Comment */"
}
ttk::labelframe $w.res -text "Preprocessing result" -padding 3
ttk::label $w.res.l3 -text "Example 1:" -anchor "w"
ttk::entryX $w.res.e3 -textvariable ::eskil($top,prefregexa) -width 60
ttk::label $w.res.l4 -text "Result 1:" -anchor "w"
ttk::label $w.res.e4 -textvariable ::eskil($top,prefregresult) \
-anchor "w" -width 10
ttk::label $w.res.l5 -text "Example 2:" -anchor "w"
ttk::entryX $w.res.e5 -textvariable ::eskil($top,prefregexa2)
ttk::label $w.res.l6 -text "Result 2:" -anchor "w"
ttk::label $w.res.e6 -textvariable ::eskil($top,prefregresult2) \
-anchor "w" -width 10
grid $w.res.l3 $w.res.e3 -sticky we -padx 3 -pady 3
grid $w.res.l4 $w.res.e4 -sticky we -padx 3 -pady 3
grid $w.res.l5 $w.res.e5 -sticky we -padx 3 -pady 3
grid $w.res.l6 $w.res.e6 -sticky we -padx 3 -pady 3
grid columnconfigure $w.res 1 -weight 1
# Buttons
ttk::frame $w.fb -padding 3
ttk::button $w.fb.b1 -text "Ok" -command [list EditPrefRegsubOk $top $w]
ttk::button $w.fb.b2 -text "Cancel" -command [list destroy $w]
set ::widgets($top,prefRegsubOk) $w.fb.b1
grid $w.fb.b1 x $w.fb.b2 -sticky we
grid columnconfigure $w.fb {0 2} -uniform a
grid columnconfigure $w.fb 1 -weight 1
# Top layout
pack $w.b -side "top" -anchor "w" -padx 3 -pady 3 -ipadx 15
pack $w.fb $w.res -side bottom -fill x -padx 3 -pady 3
# Fill in existing or an empty line
if {[llength $::Pref(regsub)] == 0} {
AddPrefRegsub $top $w
} else {
set t 1
foreach {RE Sub} $::Pref(regsub) {
set ::eskil($top,prefregexp$t) $RE
set ::eskil($top,prefregsub$t) $Sub
AddPrefRegsub $top $w
incr t
}
}
trace add variable ::eskil($top,prefregexa) write \
[list EditPrefRegsubUpdate $top]
|
|
>
>
|
>
>
>
|
|
>
|
|
>
|
>
|
|
|
|
|
>
>
>
>
>
>
>
>
|
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
|
set ::eskil($top,prefregexa2) \
"An example TextString FOR_REGSUB /* Comment */"
}
ttk::labelframe $w.res -text "Preprocessing result" -padding 3
ttk::label $w.res.l3 -text "Example 1:" -anchor "w"
ttk::entryX $w.res.e3 -textvariable ::eskil($top,prefregexa) -width 60
ttk::label $w.res.l4 -text "Result 1:" -anchor "w"
ttk::label $w.res.e4l -textvariable ::eskil($top,prefregresultl) \
-anchor "w" -width 10
ttk::label $w.res.e4r -textvariable ::eskil($top,prefregresultr) \
-anchor "w" -width 10
ttk::label $w.res.l5 -text "Example 2:" -anchor "w"
ttk::entryX $w.res.e5 -textvariable ::eskil($top,prefregexa2)
ttk::label $w.res.l6 -text "Result 2:" -anchor "w"
ttk::label $w.res.e6l -textvariable ::eskil($top,prefregresultl2) \
-anchor "w" -width 10
ttk::label $w.res.e6r -textvariable ::eskil($top,prefregresultr2) \
-anchor "w" -width 10
grid $w.res.l3 $w.res.e3 -sticky we -padx 3 -pady 3
grid $w.res.l4 $w.res.e4l -sticky we -padx 3 -pady 3
grid x $w.res.e4r -sticky we -padx 3 -pady 3
grid $w.res.l5 $w.res.e5 -sticky we -padx 3 -pady 3
grid $w.res.l6 $w.res.e6l -sticky we -padx 3 -pady 3
grid x $w.res.e6r -sticky we -padx 3 -pady 3
grid columnconfigure $w.res 1 -weight 1
# Buttons
ttk::frame $w.fb -padding 3
ttk::button $w.fb.b1 -text "Ok" -command [list EditPrefRegsubOk $top $w]
ttk::button $w.fb.b2 -text "Apply" -command [list EditPrefRegsubOk $top $w 1]
ttk::button $w.fb.b3 -text "Cancel" -command [list destroy $w]
set ::widgets($top,prefRegsubOk) $w.fb.b1
set ::widgets($top,prefRegsubApply) $w.fb.b2
grid $w.fb.b1 x $w.fb.b2 x $w.fb.b3 -sticky we
grid columnconfigure $w.fb {0 2 4} -uniform a
grid columnconfigure $w.fb {1 3} -weight 1
# Top layout
pack $w.b -side "top" -anchor "w" -padx 3 -pady 3 -ipadx 15
pack $w.fb $w.res -side bottom -fill x -padx 3 -pady 3
# Fill in existing or an empty line
if {[llength $::Pref(preprocess)] == 0} {
AddPrefRegsub $top $w
} else {
set t 1
foreach {RE Sub side} $::Pref(preprocess) {
set ::eskil($top,prefregexp$t) $RE
set ::eskil($top,prefregsub$t) $Sub
set ::eskil($top,prefregleft$t) 0
set ::eskil($top,prefregright$t) 0
if {$side eq "" || $side eq "left"} {
set ::eskil($top,prefregleft$t) 1
}
if {$side eq "" || $side eq "right"} {
set ::eskil($top,prefregright$t) 1
}
AddPrefRegsub $top $w
incr t
}
}
trace add variable ::eskil($top,prefregexa) write \
[list EditPrefRegsubUpdate $top]
|
︙ | | | ︙ | |
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
|
-nodigit : Ignore digit changes.
-nokeyword : In directory diff, ignore $ Keywords: $
-nonewline : Try to ignore newline changes.
-nonewline+ : Try to ignore newline changes, and don't display.
-prefix <str> : Care mainly about words starting with "str".
-preprocess <pair> : TBW
-r <ver> : Version info for version control mode.
-cvs : Detect CVS first, if multiple version systems are used.
-svn : Detect SVN first, if multiple version systems are used.
-a <file> : Give anscestor file for three way merge.
-conflict : Treat file as a merge conflict file and enter merge
|
>
>
|
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
|
-nodigit : Ignore digit changes.
-nokeyword : In directory diff, ignore $ Keywords: $
-nonewline : Try to ignore newline changes.
-nonewline+ : Try to ignore newline changes, and don't display.
-prefix <str> : Care mainly about words starting with "str".
-preprocess <pair> : TBW
-preprocessleft <pair> : TBW
-preprocessright <pair> : TBW
-r <ver> : Version info for version control mode.
-cvs : Detect CVS first, if multiple version systems are used.
-svn : Detect SVN first, if multiple version systems are used.
-a <file> : Give anscestor file for three way merge.
-conflict : Treat file as a merge conflict file and enter merge
|
︙ | | | ︙ | |
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
|
set allOpts {
-w --help -help -b -noignore -i -nocase -nodigit -nokeyword -prefix
-noparse -line -smallblock -block -char -word -limit -nodiff -dir
-clip -patch -browse -conflict -print
-printHeaderSize -printCharsPerLine -printPaper
-printColorChange -printColorOld -printColorNew
-server -o -a -fine -r -context -cvs -svn -review
-foreach -preprocess -close -nonewline -plugin -plugininfo
-plugindump -pluginlist
}
# If the first option is "--query", use it to ask about options.
if {$::eskil(argc) == 2 && [lindex $::eskil(argv) 0] == "--query"} {
set arg [lindex $::eskil(argv) 1]
if {[lsearch -exact $allOpts $arg] < 0} {
|
>
|
|
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
|
set allOpts {
-w --help -help -b -noignore -i -nocase -nodigit -nokeyword -prefix
-noparse -line -smallblock -block -char -word -limit -nodiff -dir
-clip -patch -browse -conflict -print
-printHeaderSize -printCharsPerLine -printPaper
-printColorChange -printColorOld -printColorNew
-server -o -a -fine -r -context -cvs -svn -review
-foreach -preprocess -preprocessleft -preprocessright
-close -nonewline -plugin -plugininfo
-plugindump -pluginlist
}
# If the first option is "--query", use it to ask about options.
if {$::eskil(argc) == 2 && [lindex $::eskil(argv) 0] == "--query"} {
set arg [lindex $::eskil(argv) 1]
if {[lsearch -exact $allOpts $arg] < 0} {
|
︙ | | | ︙ | |
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
|
} elseif {$nextArg eq "context"} {
set Pref(context) $arg
} elseif {$nextArg eq "prefix"} {
set RE [string map [list % $arg] {^.*?\m(%\w+).*$}]
if {$Pref(nocase)} {
set RE "(?i)$RE"
}
lappend ::Pref(regsub) $RE {\1}
} elseif {$nextArg eq "plugin"} {
set plugin $arg
} elseif {$nextArg eq "plugininfo"} {
set plugininfo $arg
} elseif {$nextArg eq "plugindump"} {
set plugindump $arg
} elseif {$nextArg eq "preprocess"} {
if {[catch {llength $arg} len]} {
} elseif {[llength $arg] % 2 == 1} {
} else {
# FIXA: better validity check
foreach {RE sub} $arg {
lappend ::Pref(regsub) $RE $sub
}
}
}
set nextArg ""
continue
}
# Take care of the special case of RCS style -r<rev>
|
|
|
>
|
|
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
|
} elseif {$nextArg eq "context"} {
set Pref(context) $arg
} elseif {$nextArg eq "prefix"} {
set RE [string map [list % $arg] {^.*?\m(%\w+).*$}]
if {$Pref(nocase)} {
set RE "(?i)$RE"
}
lappend ::Pref(preprocess) $RE {\1} ""
} elseif {$nextArg eq "plugin"} {
set plugin $arg
} elseif {$nextArg eq "plugininfo"} {
set plugininfo $arg
} elseif {$nextArg eq "plugindump"} {
set plugindump $arg
} elseif {[string match "preprocess*" $nextArg]} {
set side [string range $nextArg 10 end]
if {[catch {llength $arg} len]} {
} elseif {[llength $arg] % 2 == 1} {
} else {
# FIXA: better validity check
foreach {RE sub} $arg {
lappend ::Pref(preprocess) $RE $sub $side
}
}
}
set nextArg ""
continue
}
# Take care of the special case of RCS style -r<rev>
|
︙ | | | ︙ | |
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
|
set Pref(nodigit) 1
} elseif {$arg eq "-nokeyword"} {
set Pref(dir,ignorekey) 1
} elseif {$arg eq "-prefix"} {
set nextArg prefix
} elseif {$arg eq "-preprocess"} {
set nextArg preprocess
} elseif {$arg eq "-plugin"} {
set nextArg "plugin"
} elseif {$arg eq "-plugininfo"} {
set nextArg "plugininfo"
} elseif {$arg eq "-plugindump"} {
set nextArg "plugindump"
} elseif {$arg eq "-pluginlist"} {
|
>
>
>
>
|
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
|
set Pref(nodigit) 1
} elseif {$arg eq "-nokeyword"} {
set Pref(dir,ignorekey) 1
} elseif {$arg eq "-prefix"} {
set nextArg prefix
} elseif {$arg eq "-preprocess"} {
set nextArg preprocess
} elseif {$arg eq "-preprocessleft"} {
set nextArg preprocessleft
} elseif {$arg eq "-preprocessright"} {
set nextArg preprocessright
} elseif {$arg eq "-plugin"} {
set nextArg "plugin"
} elseif {$arg eq "-plugininfo"} {
set nextArg "plugininfo"
} elseif {$arg eq "-plugindump"} {
set nextArg "plugindump"
} elseif {$arg eq "-pluginlist"} {
|
︙ | | | ︙ | |
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
|
set Pref(bgnew2) \#e0e0ff
set Pref(context) -1
set Pref(finegrainchunks) 0
set Pref(marklast) 1
set Pref(linewidth) 80
set Pref(lines) 60
set Pref(editor) ""
set Pref(regsub) {}
set Pref(toolbar) 0
set Pref(wideMap) 0 ;# Not settable in GUI yet
# Print options
set Pref(printHeaderSize) 10
set Pref(printCharsPerLine) 80
set Pref(printPaper) a4
|
|
|
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
|
set Pref(bgnew2) \#e0e0ff
set Pref(context) -1
set Pref(finegrainchunks) 0
set Pref(marklast) 1
set Pref(linewidth) 80
set Pref(lines) 60
set Pref(editor) ""
set Pref(preprocess) {}
set Pref(toolbar) 0
set Pref(wideMap) 0 ;# Not settable in GUI yet
# Print options
set Pref(printHeaderSize) 10
set Pref(printCharsPerLine) 80
set Pref(printPaper) a4
|
︙ | | | ︙ | |
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
|
set Pref(dir,incdirs) ""
set Pref(dir,exdirs) "RCS CVS .git .svn .hg"
set Pref(dir,onlyrev) 0
# Store default preferences, to filter saved preferences
array set ::DefaultPref [array get Pref]
# Backward compatibilty option
set Pref(onlydiffs) -1
set ::eskil(filter) ""
if {![info exists ::eskil_testsuite] && [file exists "~/.eskilrc"]} {
safeLoad "~/.eskilrc" Pref
}
if {$Pref(editor) ne ""} {
set ::util(editor) $Pref(editor)
}
# If the user's file has this old option, translate it to the new
if {$Pref(onlydiffs) == 0} {
set Pref(context) -1
}
unset Pref(onlydiffs)
# Set up reactions to some Pref settings
if {![info exists ::widgets(toolbars)]} {
set ::widgets(toolbars) {}
}
trace add variable ::Pref(toolbar) write TraceToolbar
}
|
|
>
>
>
>
>
>
>
|
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
|
set Pref(dir,incdirs) ""
set Pref(dir,exdirs) "RCS CVS .git .svn .hg"
set Pref(dir,onlyrev) 0
# Store default preferences, to filter saved preferences
array set ::DefaultPref [array get Pref]
# Backward compatibilty options
set Pref(onlydiffs) -1
set Pref(regsub) {}
set ::eskil(filter) ""
if {![info exists ::eskil_testsuite] && [file exists "~/.eskilrc"]} {
safeLoad "~/.eskilrc" Pref
}
if {$Pref(editor) ne ""} {
set ::util(editor) $Pref(editor)
}
# If the user's file has this old option, translate it to the new
if {$Pref(onlydiffs) == 0} {
set Pref(context) -1
}
unset Pref(onlydiffs)
if {$Pref(regsub) ne ""} {
foreach {a b} $Pref(regsub) {
lappend Pref(preprocess) $a $b ""
}
}
unset Pref(regsub)
# Set up reactions to some Pref settings
if {![info exists ::widgets(toolbars)]} {
set ::widgets(toolbars) {}
}
trace add variable ::Pref(toolbar) write TraceToolbar
}
|
︙ | | | ︙ | |