patch 9.2.0522: event_nr2name() in autocmd.c can be improved
Problem: event_nr2name() in autocmd.c can be improved
Solution: Refactor it so that event_nr2name() returns a string_T type
(John Marriott).
Additionally:
- change the define to an enum.
- in function auto_next_pat(), move some variables closer to where they
are used; rename s to fmt along the way.
closes: #20272
Signed-off-by: John Marriott <basilisk@internode.on.net> Signed-off-by: Christian Brabandt <cb@256bit.org>