Skip to content

Commit e6c3dd3

Browse files
miss-islingtonkoyuki7whugovk
authored
[3.12] gh-101100: Fix sphinx warnings in readline.rst (GH-130300) (#130347)
Co-authored-by: Yuki Kobayashi <[email protected]> Co-authored-by: Hugo van Kemenade <[email protected]>
1 parent e63ca56 commit e6c3dd3

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

Doc/library/readline.rst

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ The following functions relate to the init file and user configuration:
5858
.. function:: parse_and_bind(string)
5959

6060
Execute the init line provided in the *string* argument. This calls
61-
:c:func:`rl_parse_and_bind` in the underlying library.
61+
:c:func:`!rl_parse_and_bind` in the underlying library.
6262

6363

6464
.. function:: read_init_file([filename])
6565

6666
Execute a readline initialization file. The default filename is the last filename
67-
used. This calls :c:func:`rl_read_init_file` in the underlying library.
67+
used. This calls :c:func:`!rl_read_init_file` in the underlying library.
6868

6969

7070
Line buffer
@@ -75,21 +75,21 @@ The following functions operate on the line buffer:
7575

7676
.. function:: get_line_buffer()
7777

78-
Return the current contents of the line buffer (:c:data:`rl_line_buffer`
78+
Return the current contents of the line buffer (:c:data:`!rl_line_buffer`
7979
in the underlying library).
8080

8181

8282
.. function:: insert_text(string)
8383

8484
Insert text into the line buffer at the cursor position. This calls
85-
:c:func:`rl_insert_text` in the underlying library, but ignores
85+
:c:func:`!rl_insert_text` in the underlying library, but ignores
8686
the return value.
8787

8888

8989
.. function:: redisplay()
9090

9191
Change what's displayed on the screen to reflect the current contents of the
92-
line buffer. This calls :c:func:`rl_redisplay` in the underlying library.
92+
line buffer. This calls :c:func:`!rl_redisplay` in the underlying library.
9393

9494

9595
History file
@@ -102,21 +102,21 @@ The following functions operate on a history file:
102102

103103
Load a readline history file, and append it to the history list.
104104
The default filename is :file:`~/.history`. This calls
105-
:c:func:`read_history` in the underlying library.
105+
:c:func:`!read_history` in the underlying library.
106106

107107

108108
.. function:: write_history_file([filename])
109109

110110
Save the history list to a readline history file, overwriting any
111111
existing file. The default filename is :file:`~/.history`. This calls
112-
:c:func:`write_history` in the underlying library.
112+
:c:func:`!write_history` in the underlying library.
113113

114114

115115
.. function:: append_history_file(nelements[, filename])
116116

117117
Append the last *nelements* items of history to a file. The default filename is
118118
:file:`~/.history`. The file must already exist. This calls
119-
:c:func:`append_history` in the underlying library. This function
119+
:c:func:`!append_history` in the underlying library. This function
120120
only exists if Python was compiled for a version of the library
121121
that supports it.
122122

@@ -128,7 +128,7 @@ The following functions operate on a history file:
128128

129129
Set or return the desired number of lines to save in the history file.
130130
The :func:`write_history_file` function uses this value to truncate
131-
the history file, by calling :c:func:`history_truncate_file` in
131+
the history file, by calling :c:func:`!history_truncate_file` in
132132
the underlying library. Negative values imply
133133
unlimited history file size.
134134

@@ -141,7 +141,7 @@ The following functions operate on a global history list:
141141

142142
.. function:: clear_history()
143143

144-
Clear the current history. This calls :c:func:`clear_history` in the
144+
Clear the current history. This calls :c:func:`!clear_history` in the
145145
underlying library. The Python function only exists if Python was
146146
compiled for a version of the library that supports it.
147147

@@ -156,32 +156,32 @@ The following functions operate on a global history list:
156156
.. function:: get_history_item(index)
157157

158158
Return the current contents of history item at *index*. The item index
159-
is one-based. This calls :c:func:`history_get` in the underlying library.
159+
is one-based. This calls :c:func:`!history_get` in the underlying library.
160160

161161

162162
.. function:: remove_history_item(pos)
163163

164164
Remove history item specified by its position from the history.
165-
The position is zero-based. This calls :c:func:`remove_history` in
165+
The position is zero-based. This calls :c:func:`!remove_history` in
166166
the underlying library.
167167

168168

169169
.. function:: replace_history_item(pos, line)
170170

171171
Replace history item specified by its position with *line*.
172-
The position is zero-based. This calls :c:func:`replace_history_entry`
172+
The position is zero-based. This calls :c:func:`!replace_history_entry`
173173
in the underlying library.
174174

175175

176176
.. function:: add_history(line)
177177

178178
Append *line* to the history buffer, as if it was the last line typed.
179-
This calls :c:func:`add_history` in the underlying library.
179+
This calls :c:func:`!add_history` in the underlying library.
180180

181181

182182
.. function:: set_auto_history(enabled)
183183

184-
Enable or disable automatic calls to :c:func:`add_history` when reading
184+
Enable or disable automatic calls to :c:func:`!add_history` when reading
185185
input via readline. The *enabled* argument should be a Boolean value
186186
that when true, enables auto history, and that when false, disables
187187
auto history.
@@ -199,7 +199,7 @@ Startup hooks
199199

200200
.. function:: set_startup_hook([function])
201201

202-
Set or remove the function invoked by the :c:data:`rl_startup_hook`
202+
Set or remove the function invoked by the :c:data:`!rl_startup_hook`
203203
callback of the underlying library. If *function* is specified, it will
204204
be used as the new hook function; if omitted or ``None``, any function
205205
already installed is removed. The hook is called with no
@@ -208,7 +208,7 @@ Startup hooks
208208

209209
.. function:: set_pre_input_hook([function])
210210

211-
Set or remove the function invoked by the :c:data:`rl_pre_input_hook`
211+
Set or remove the function invoked by the :c:data:`!rl_pre_input_hook`
212212
callback of the underlying library. If *function* is specified, it will
213213
be used as the new hook function; if omitted or ``None``, any
214214
function already installed is removed. The hook is called
@@ -240,9 +240,9 @@ with a custom completer, a different set of word delimiters should be set.
240240
starting with *text*.
241241

242242
The installed completer function is invoked by the *entry_func* callback
243-
passed to :c:func:`rl_completion_matches` in the underlying library.
243+
passed to :c:func:`!rl_completion_matches` in the underlying library.
244244
The *text* string comes from the first parameter to the
245-
:c:data:`rl_attempted_completion_function` callback of the
245+
:c:data:`!rl_attempted_completion_function` callback of the
246246
underlying library.
247247

248248

@@ -254,7 +254,7 @@ with a custom completer, a different set of word delimiters should be set.
254254
.. function:: get_completion_type()
255255

256256
Get the type of completion being attempted. This returns the
257-
:c:data:`rl_completion_type` variable in the underlying library as
257+
:c:data:`!rl_completion_type` variable in the underlying library as
258258
an integer.
259259

260260

@@ -263,7 +263,7 @@ with a custom completer, a different set of word delimiters should be set.
263263

264264
Get the beginning or ending index of the completion scope.
265265
These indexes are the *start* and *end* arguments passed to the
266-
:c:data:`rl_attempted_completion_function` callback of the
266+
:c:data:`!rl_attempted_completion_function` callback of the
267267
underlying library. The values may be different in the same
268268
input editing scenario based on the underlying C readline implementation.
269269
Ex: libedit is known to behave differently than libreadline.
@@ -274,7 +274,7 @@ with a custom completer, a different set of word delimiters should be set.
274274

275275
Set or get the word delimiters for completion. These determine the
276276
start of the word to be considered for completion (the completion scope).
277-
These functions access the :c:data:`rl_completer_word_break_characters`
277+
These functions access the :c:data:`!rl_completer_word_break_characters`
278278
variable in the underlying library.
279279

280280

@@ -284,7 +284,7 @@ with a custom completer, a different set of word delimiters should be set.
284284
specified, it will be used as the new completion display function;
285285
if omitted or ``None``, any completion display function already
286286
installed is removed. This sets or clears the
287-
:c:data:`rl_completion_display_matches_hook` callback in the
287+
:c:data:`!rl_completion_display_matches_hook` callback in the
288288
underlying library. The completion display function is called as
289289
``function(substitution, [matches], longest_match_length)`` once
290290
each time matches need to be displayed.

0 commit comments

Comments
 (0)