Skip to content

Commit 916b450

Browse files
barroitgitster
authored andcommitted
doc: document autocorrect API
Explain behaviors for autocorrect_resolve(), autocorrect_confirm(), and struct autocorrect. Signed-off-by: Jiamu Sun <39@barroit.sh> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 273faab commit 916b450

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

autocorrect.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,24 @@ enum autocorrect_mode {
99
AUTOCORRECT_DELAY,
1010
};
1111

12+
/**
13+
* `mode` indicates which action will be performed by autocorrect_confirm().
14+
* `delay` is the timeout before autocorrect_confirm() returns, in tenths of a
15+
* second. Use it only with AUTOCORRECT_DELAY.
16+
*/
1217
struct autocorrect {
1318
enum autocorrect_mode mode;
1419
int delay;
1520
};
1621

22+
/**
23+
* Resolve the autocorrect configuration into `conf`.
24+
*/
1725
void autocorrect_resolve(struct autocorrect *conf);
1826

27+
/**
28+
* Interact with the user in different ways depending on `conf->mode`.
29+
*/
1930
void autocorrect_confirm(struct autocorrect *conf, const char *assumed);
2031

2132
#endif /* AUTOCORRECT_H */

0 commit comments

Comments
 (0)