Skip to content

Commit 059e5db

Browse files
committed
Issue #3068: Change 0/1 to False/True so that extension configure dialog can
easily recognize and display boolean values as such and recognize changes. Also reformat comments and alphabetize extensions included with Idle.
1 parent 49027a4 commit 059e5db

File tree

1 file changed

+60
-58
lines changed

1 file changed

+60
-58
lines changed

Lib/idlelib/config-extensions.def

Lines changed: 60 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -3,94 +3,96 @@
33
# IDLE reads several config files to determine user preferences. This
44
# file is the default configuration file for IDLE extensions settings.
55
#
6-
# Each extension must have at least one section, named after the extension
7-
# module. This section must contain an 'enable' item (=1 to enable the
8-
# extension, =0 to disable it), it may contain 'enable_editor' or 'enable_shell'
9-
# items, to apply it only to editor/shell windows, and may also contain any
10-
# other general configuration items for the extension.
6+
# Each extension must have at least one section, named after the
7+
# extension module. This section must contain an 'enable' item (=True to
8+
# enable the extension, =False to disable it), it may contain
9+
# 'enable_editor' or 'enable_shell' items, to apply it only to editor ir
10+
# shell windows, and may also contain any other general configuration
11+
# items for the extension. Other True/False values will also be
12+
# recognized as boolean by the Extension Configuration dialog.
1113
#
12-
# Each extension must define at least one section named ExtensionName_bindings
13-
# or ExtensionName_cfgBindings. If present, ExtensionName_bindings defines
14-
# virtual event bindings for the extension that are not user re-configurable.
15-
# If present, ExtensionName_cfgBindings defines virtual event bindings for the
14+
# Each extension must define at least one section named
15+
# ExtensionName_bindings or ExtensionName_cfgBindings. If present,
16+
# ExtensionName_bindings defines virtual event bindings for the
17+
# extension that are not user re-configurable. If present,
18+
# ExtensionName_cfgBindings defines virtual event bindings for the
1619
# extension that may be sensibly re-configured.
1720
#
18-
# If there are no keybindings for a menus' virtual events, include lines like
19-
# <<toggle-code-context>>= (See [CodeContext], below.)
21+
# If there are no keybindings for a menus' virtual events, include lines
22+
# like <<toggle-code-context>>= (See [CodeContext], below.)
2023
#
21-
# Currently it is necessary to manually modify this file to change extension
22-
# key bindings and default values. To customize, create
24+
# Currently it is necessary to manually modify this file to change
25+
# extension key bindings and default values. To customize, create
2326
# ~/.idlerc/config-extensions.cfg and append the appropriate customized
2427
# section(s). Those sections will override the defaults in this file.
2528
#
26-
# Note: If a keybinding is already in use when the extension is
27-
# loaded, the extension's virtual event's keybinding will be set to ''.
29+
# Note: If a keybinding is already in use when the extension is loaded,
30+
# the extension's virtual event's keybinding will be set to ''.
2831
#
2932
# See config-keys.def for notes on specifying keys and extend.txt for
3033
# information on creating IDLE extensions.
3134

32-
[FormatParagraph]
33-
enable=1
34-
[FormatParagraph_cfgBindings]
35-
format-paragraph=<Alt-Key-q>
35+
[AutoComplete]
36+
enable=True
37+
popupwait=2000
38+
[AutoComplete_cfgBindings]
39+
force-open-completions=<Control-Key-space>
40+
[AutoComplete_bindings]
41+
autocomplete=<Key-Tab>
42+
try-open-completions=<KeyRelease-period> <KeyRelease-slash> <KeyRelease-backslash>
3643

3744
[AutoExpand]
38-
enable=1
45+
enable=True
3946
[AutoExpand_cfgBindings]
4047
expand-word=<Alt-Key-slash>
4148

42-
[ZoomHeight]
43-
enable=1
44-
[ZoomHeight_cfgBindings]
45-
zoom-height=<Alt-Key-2>
46-
47-
[ScriptBinding]
48-
enable=1
49-
enable_shell=0
50-
enable_editor=1
51-
[ScriptBinding_cfgBindings]
52-
run-module=<Key-F5>
53-
check-module=<Alt-Key-x>
54-
5549
[CallTips]
56-
enable=1
50+
enable=True
5751
[CallTips_cfgBindings]
5852
force-open-calltip=<Control-Key-backslash>
5953
[CallTips_bindings]
6054
try-open-calltip=<KeyRelease-parenleft>
6155
refresh-calltip=<KeyRelease-parenright> <KeyRelease-0>
6256

57+
[CodeContext]
58+
enable=True
59+
enable_shell=False
60+
numlines=3
61+
visible=False
62+
bgcolor=LightGray
63+
fgcolor=Black
64+
[CodeContext_bindings]
65+
toggle-code-context=
66+
67+
[FormatParagraph]
68+
enable=True
69+
[FormatParagraph_cfgBindings]
70+
format-paragraph=<Alt-Key-q>
71+
6372
[ParenMatch]
64-
enable=1
73+
enable=True
6574
style= expression
6675
flash-delay= 500
67-
bell= 1
76+
bell=True
6877
[ParenMatch_cfgBindings]
6978
flash-paren=<Control-Key-0>
7079
[ParenMatch_bindings]
7180
paren-closed=<KeyRelease-parenright> <KeyRelease-bracketright> <KeyRelease-braceright>
7281

73-
[AutoComplete]
74-
enable=1
75-
popupwait=2000
76-
[AutoComplete_cfgBindings]
77-
force-open-completions=<Control-Key-space>
78-
[AutoComplete_bindings]
79-
autocomplete=<Key-Tab>
80-
try-open-completions=<KeyRelease-period> <KeyRelease-slash> <KeyRelease-backslash>
81-
82-
[CodeContext]
83-
enable=1
84-
enable_shell=0
85-
numlines=3
86-
visible=0
87-
bgcolor=LightGray
88-
fgcolor=Black
89-
[CodeContext_bindings]
90-
toggle-code-context=
91-
9282
[RstripExtension]
93-
enable=1
94-
enable_shell=0
95-
enable_editor=1
83+
enable=True
84+
enable_shell=False
85+
enable_editor=True
9686

87+
[ScriptBinding]
88+
enable=True
89+
enable_shell=False
90+
enable_editor=True
91+
[ScriptBinding_cfgBindings]
92+
run-module=<Key-F5>
93+
check-module=<Alt-Key-x>
94+
95+
[ZoomHeight]
96+
enable=True
97+
[ZoomHeight_cfgBindings]
98+
zoom-height=<Alt-Key-2>

0 commit comments

Comments
 (0)