Skip to content

Commit 365d58a

Browse files
h-eastclaude
authored andcommitted
patch 9.2.0305: mismatch between return types and documentation
Problem: mismatch between return types and documentation Solution: Fix documentation, update f_err_teapot() return type to void (Hirohito Higashi) - Fix summary table in builtin.txt: feedkeys, foreground, setcharsearch, term_wait, test_void, wildtrigger, ch_sendraw from non-none to none; listener_remove and prop_add from none to Number - Fix err_teapot in evalfunc.c: ret_number_bool to ret_void - Fix "Return type:" in detailed doc sections (64 functions across builtin.txt, channel.txt, terminal.txt, popup.txt, testing.txt, textprop.txt) from wrong types to void - Add missing "Return type: void" for prompt_setcallback and prop_add_list closes: #19922 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Hirohito Higashi <h.east.727@gmail.com> Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
1 parent b03970f commit 365d58a

8 files changed

Lines changed: 87 additions & 82 deletions

File tree

runtime/doc/builtin.txt

Lines changed: 42 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*builtin.txt* For Vim version 9.2. Last change: 2026 Apr 05
1+
*builtin.txt* For Vim version 9.2. Last change: 2026 Apr 06
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -120,7 +120,7 @@ ch_readraw({handle} [, {options}])
120120
ch_sendexpr({handle}, {expr} [, {options}])
121121
any send {expr} over JSON {handle}
122122
ch_sendraw({handle}, {expr} [, {options}])
123-
any send {expr} over raw {handle}
123+
none send {expr} over raw {handle}
124124
ch_setoptions({handle}, {options})
125125
none set options for {handle}
126126
ch_status({handle} [, {options}])
@@ -192,7 +192,7 @@ extendnew({expr1}, {expr2} [, {expr3}])
192192
List/Dict
193193
like |extend()| but creates a new List
194194
or Dictionary
195-
feedkeys({string} [, {mode}]) Number add key sequence to typeahead buffer
195+
feedkeys({string} [, {mode}]) none add key sequence to typeahead buffer
196196
filecopy({from}, {to}) Number |TRUE| if copying file {from} to {to}
197197
worked
198198
filereadable({file}) Number |TRUE| if {file} is a readable file
@@ -219,7 +219,7 @@ foldtext() String line displayed for closed fold
219219
foldtextresult({lnum}) String text for closed fold at {lnum}
220220
foreach({expr1}, {expr2}) List/Tuple/Dict/Blob/String
221221
for each item in {expr1} call {expr2}
222-
foreground() Number bring the Vim window to the foreground
222+
foreground() none bring the Vim window to the foreground
223223
fullcommand({name} [, {vim9}]) String get full command from {name}
224224
funcref({name} [, {arglist}] [, {dict}])
225225
Funcref reference to function {name}
@@ -391,7 +391,7 @@ list2tuple({list}) Tuple turn {list} of items into a tuple
391391
listener_add({callback} [, {buf} [, {unbuffered}]])
392392
Number add a callback to listen to changes
393393
listener_flush([{buf}]) none invoke listener callbacks
394-
listener_remove({id}) none remove a listener callback
394+
listener_remove({id}) Number remove a listener callback
395395
localtime() Number current time
396396
log({expr}) Float natural logarithm (base e) of {expr}
397397
log10({expr}) Float logarithm of Float {expr} to base 10
@@ -486,7 +486,7 @@ prompt_setinterrupt({buf}, {text})
486486
none set prompt interrupt function
487487
prompt_setprompt({buf}, {text}) none set prompt text
488488
prop_add({lnum}, {col}, {props})
489-
none add one text property
489+
Number add one text property
490490
prop_add_list({props}, [[{lnum}, {col}, {end-lnum}, {end-col}], ...])
491491
none add multiple text properties
492492
prop_clear({lnum} [, {lnum-end} [, {props}]])
@@ -581,7 +581,7 @@ setbufvar({buf}, {varname}, {val})
581581
none set {varname} in buffer {buf} to {val}
582582
setcellwidths({list}) none set character cell width overrides
583583
setcharpos({expr}, {list}) Number set the {expr} position to {list}
584-
setcharsearch({dict}) Dict set character search from {dict}
584+
setcharsearch({dict}) none set character search from {dict}
585585
setcmdline({str} [, {pos}]) Number set command-line
586586
setcmdpos({pos}) Number set cursor position in command-line
587587
setcursorcharpos({list}) Number move cursor to position in {list}
@@ -699,8 +699,7 @@ synconcealed({lnum}, {col}) List info about concealing
699699
synstack({lnum}, {col}) List stack of syntax IDs at {lnum} and
700700
{col}
701701
system({expr} [, {input}]) String output of shell command/filter {expr}
702-
systemlist({expr} [, {input}])
703-
List output of shell command/filter {expr}
702+
systemlist({expr} [, {input}]) List output of shell command/filter {expr}
704703
tabpagebuflist([{arg}]) List list of buffer numbers in tab page
705704
tabpagenr([{arg}]) Number number of current or last tab page
706705
tabpagewinnr({tabarg} [, {arg}])
@@ -739,7 +738,7 @@ term_setrestore({buf}, {command})
739738
term_setsize({buf}, {rows}, {cols})
740739
none set the size of a terminal
741740
term_start({cmd} [, {options}]) Number open a terminal window and run a job
742-
term_wait({buf} [, {time}]) Number wait for screen to be updated
741+
term_wait({buf} [, {time}]) none wait for screen to be updated
743742
terminalprops() Dict properties of the terminal
744743
test_alloc_fail({id}, {countdown}, {repeat})
745744
none make memory allocation fail
@@ -768,7 +767,7 @@ test_setmouse({row}, {col}) none set the mouse position for testing
768767
test_settime({expr}) none set current time for testing
769768
test_srand_seed([{seed}]) none set seed for testing srand()
770769
test_unknown() any unknown value for testing
771-
test_void() any void value for testing
770+
test_void() none void value for testing
772771
timer_info([{id}]) List information about timers
773772
timer_pause({id}, {pause}) none pause or unpause a timer
774773
timer_start({time}, {callback} [, {options}])
@@ -803,7 +802,7 @@ virtcol2col({winid}, {lnum}, {col})
803802
Number byte index of a character on screen
804803
visualmode([{expr}]) String last visual mode used
805804
wildmenumode() Number whether 'wildmenu' mode is active
806-
wildtrigger() Number start wildcard expansion
805+
wildtrigger() none start wildcard expansion
807806
win_execute({id}, {command} [, {silent}])
808807
String execute {command} in window {id}
809808
win_findbuf({bufnr}) List find windows containing {bufnr}
@@ -1273,7 +1272,7 @@ balloon_show({expr}) *balloon_show()*
12731272
{only available when compiled with the |+balloon_eval| or
12741273
|+balloon_eval_term| feature}
12751274

1276-
Return type: |Number|
1275+
Return type: void
12771276

12781277

12791278
balloon_split({msg}) *balloon_split()*
@@ -1895,7 +1894,7 @@ clearmatches([{win}]) *clearmatches()*
18951894
Can also be used as a |method|: >
18961895
GetWin()->clearmatches()
18971896
<
1898-
Return type: |Number|
1897+
Return type: void
18991898

19001899

19011900
cmdcomplete_info() *cmdcomplete_info()*
@@ -2015,7 +2014,7 @@ complete({startcol}, {matches}) *complete()* *E785*
20152014
second argument: >
20162015
GetMatches()->complete(col('.'))
20172016
<
2018-
Return type: |Number|
2017+
Return type: void
20192018

20202019

20212020
complete_add({expr}) *complete_add()*
@@ -2659,7 +2658,7 @@ echoraw({string}) *echoraw()*
26592658
call echoraw(&t_TI)
26602659
< Use with care, you can mess up the terminal this way.
26612660

2662-
Return type: |Number|
2661+
Return type: void
26632662

26642663

26652664
empty({expr}) *empty()*
@@ -2702,7 +2701,7 @@ err_teapot([{expr}]) *err_teapot()*
27022701
indicating that coffee is temporarily not available.
27032702
If {expr} is present it must be a String.
27042703

2705-
Return type: |Number|
2704+
Return type: void
27062705

27072706

27082707
escape({string}, {chars}) *escape()*
@@ -3219,7 +3218,7 @@ feedkeys({string} [, {mode}]) *feedkeys()*
32193218
Can also be used as a |method|: >
32203219
GetInput()->feedkeys()
32213220
<
3222-
Return type: |Number|
3221+
Return type: void
32233222

32243223

32253224
filecopy({from}, {to}) *filecopy()*
@@ -3656,7 +3655,7 @@ foreground() *foreground()*
36563655
allow a window to bring itself to the foreground. Use
36573656
|remote_foreground()| instead.
36583657

3659-
Return type: |Number|
3658+
Return type: void
36603659
{only in the Win32, Motif and GTK GUI versions and the
36613660
Win32 console version}
36623661

@@ -3808,7 +3807,7 @@ garbagecollect([{atexit}]) *garbagecollect()*
38083807
type a character. To force garbage collection immediately use
38093808
|test_garbagecollect_now()|.
38103809

3811-
Return type: |String|
3810+
Return type: void
38123811

38133812

38143813
get({list}, {idx} [, {default}]) *get()* *get()-list*
@@ -6877,7 +6876,7 @@ listener_flush([{buf}]) *listener_flush()*
68776876
Can also be used as a |method|: >
68786877
GetBuffer()->listener_flush()
68796878
<
6880-
Return type: |Number|
6879+
Return type: void
68816880

68826881

68836882
listener_remove({id}) *listener_remove()*
@@ -7221,7 +7220,7 @@ mapset({dict})
72217220
mapset(d)
72227221
endfor
72237222
<
7224-
Return type: |Number|
7223+
Return type: void
72257224

72267225

72277226
match({expr}, {pat} [, {start} [, {count}]]) *match()*
@@ -8484,8 +8483,10 @@ prompt_setcallback({buf}, {expr}) *prompt_setcallback()*
84848483
84858484
< Can also be used as a |method|: >
84868485
GetBuffer()->prompt_setcallback(callback)
8486+
<
8487+
Return type: void
84878488

8488-
< {only available when compiled with the |+channel| feature}
8489+
{only available when compiled with the |+channel| feature}
84898490

84908491
prompt_setinterrupt({buf}, {expr}) *prompt_setinterrupt()*
84918492
Set a callback for buffer {buf} to {expr}. When {expr} is an
@@ -8499,7 +8500,7 @@ prompt_setinterrupt({buf}, {expr}) *prompt_setinterrupt()*
84998500
Can also be used as a |method|: >
85008501
GetBuffer()->prompt_setinterrupt(callback)
85018502
<
8502-
Return type: |Number|
8503+
Return type: void
85038504

85048505
{only available when compiled with the |+channel| feature}
85058506

@@ -8513,7 +8514,7 @@ prompt_setprompt({buf}, {text}) *prompt_setprompt()*
85138514
Can also be used as a |method|: >
85148515
GetBuffer()->prompt_setprompt('command: ')
85158516
<
8516-
Return type: |Number|
8517+
Return type: void
85178518

85188519
{only available when compiled with the |+channel| feature}
85198520

@@ -8876,7 +8877,7 @@ redraw_listener_remove({id}) *redraw_listener_remove()*
88768877
Can also be used as a |method|: >
88778878
GetRedrawListenerId()->redraw_listener_remove()
88788879
<
8879-
Return type: |Number|
8880+
Return type: void
88808881

88818882

88828883
reduce({object}, {func} [, {initial}]) *reduce()* *E998*
@@ -9132,7 +9133,7 @@ remote_startserver({name}) *remote_startserver()* *E941* *E942*
91329133
Can also be used as a |method|: >
91339134
ServerName()->remote_startserver()
91349135
<
9135-
Return type: |Number|
9136+
Return type: void
91369137

91379138
{only available when compiled with the |+clientserver| feature}
91389139

@@ -9880,7 +9881,7 @@ setbufvar({buf}, {varname}, {val}) *setbufvar()*
98809881
third argument: >
98819882
GetValue()->setbufvar(buf, varname)
98829883
<
9883-
Return type: |Number|
9884+
Return type: void
98849885

98859886

98869887
setcellwidths({list}) *setcellwidths()*
@@ -9917,7 +9918,7 @@ setcellwidths({list}) *setcellwidths()*
99179918
match with what Vim knows about each emoji. If it doesn't
99189919
look right you need to adjust the {list} argument.
99199920

9920-
Return type: |Number|
9921+
Return type: void
99219922

99229923

99239924
setcharpos({expr}, {list}) *setcharpos()*
@@ -9960,7 +9961,7 @@ setcharsearch({dict}) *setcharsearch()*
99609961
Can also be used as a |method|: >
99619962
SavedSearch()->setcharsearch()
99629963
<
9963-
Return type: dict<any>
9964+
Return type: void
99649965

99659966

99669967
setcmdline({str} [, {pos}]) *setcmdline()*
@@ -10027,7 +10028,7 @@ setenv({name}, {val}) *setenv()*
1002710028
second argument: >
1002810029
GetPath()->setenv('PATH')
1002910030
<
10030-
Return type: |Number|
10031+
Return type: void
1003110032

1003210033

1003310034
setfperm({fname}, {mode}) *setfperm()* *chmod*
@@ -10386,7 +10387,7 @@ settabvar({tabnr}, {varname}, {val}) *settabvar()*
1038610387
third argument: >
1038710388
GetValue()->settabvar(tab, name)
1038810389
<
10389-
Return type: |Number|
10390+
Return type: void
1039010391

1039110392

1039210393
settabwinvar({tabnr}, {winnr}, {varname}, {val}) *settabwinvar()*
@@ -10411,7 +10412,7 @@ settabwinvar({tabnr}, {winnr}, {varname}, {val}) *settabwinvar()*
1041110412
fourth argument: >
1041210413
GetValue()->settabwinvar(tab, winnr, name)
1041310414
<
10414-
Return type: |Number|
10415+
Return type: void
1041510416

1041610417

1041710418
settagstack({nr}, {dict} [, {action}]) *settagstack()*
@@ -10464,7 +10465,7 @@ setwinvar({winnr}, {varname}, {val}) *setwinvar()*
1046410465
third argument: >
1046510466
GetValue()->setwinvar(winnr, name)
1046610467
<
10467-
Return type: |Number|
10468+
Return type: void
1046810469

1046910470

1047010471
sha256({expr}) *sha256()*
@@ -10704,7 +10705,7 @@ sound_clear() *sound_clear()*
1070410705
On some Linux systems you may need the libcanberra-pulse
1070510706
package, otherwise sound may not stop.
1070610707

10707-
Return type: |Number|
10708+
Return type: void
1070810709

1070910710
{only available when compiled with the |+sound| feature}
1071010711

@@ -10774,7 +10775,7 @@ sound_stop({id}) *sound_stop()*
1077410775
Can also be used as a |method|: >
1077510776
soundid->sound_stop()
1077610777
<
10777-
Return type: |Number|
10778+
Return type: void
1077810779

1077910780
{only available when compiled with the |+sound| feature}
1078010781

@@ -12059,7 +12060,7 @@ timer_pause({timer}, {paused}) *timer_pause()*
1205912060
Can also be used as a |method|: >
1206012061
GetTimer()->timer_pause(1)
1206112062
<
12062-
Return type: |Number|
12063+
Return type: void
1206312064

1206412065
{only available when compiled with the |+timers| feature}
1206512066

@@ -12119,7 +12120,7 @@ timer_stop({timer}) *timer_stop()*
1211912120
Can also be used as a |method|: >
1212012121
GetTimer()->timer_stop()
1212112122
<
12122-
Return type: |Number|
12123+
Return type: void
1212312124

1212412125
{only available when compiled with the |+timers| feature}
1212512126

@@ -12129,7 +12130,7 @@ timer_stopall() *timer_stopall()*
1212912130
invoked. Useful if a timer is misbehaving. If there are no
1213012131
timers there is no error.
1213112132

12132-
Return type: |Number|
12133+
Return type: void
1213312134

1213412135
{only available when compiled with the |+timers| feature}
1213512136

@@ -12619,7 +12620,7 @@ wildtrigger() *wildtrigger()*
1261912620

1262012621
Return value is always 0.
1262112622

12622-
Return type: |Number|
12623+
Return type: void
1262312624

1262412625

1262512626
win_execute({id}, {command} [, {silent}]) *win_execute()*
@@ -12971,7 +12972,7 @@ winrestview({dict}) *winrestview()*
1297112972
Can also be used as a |method|: >
1297212973
GetView()->winrestview()
1297312974
<
12974-
Return type: |Number|
12975+
Return type: void
1297512976

1297612977

1297712978
winsaveview() *winsaveview()*

0 commit comments

Comments
 (0)