4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: ":au filetypedetect" gives an error for a non-existing event name,
12 but it's actually a non-existing group name. (Antoine Mechelynck)
13 Solution: Make the error message clearer.
17 *** ../vim-6.2.043/src/fileio.c Thu Jul 24 21:45:33 2003
18 --- src/fileio.c Tue Jun 24 15:34:24 2003
21 static int au_find_group __ARGS((char_u *name));
22 static EVENT_T event_name2nr __ARGS((char_u *start, char_u **end));
23 static char_u *event_nr2name __ARGS((EVENT_T event));
24 ! static char_u *find_end_event __ARGS((char_u *arg));
25 static int event_ignored __ARGS((EVENT_T event));
26 static int au_get_grouparg __ARGS((char_u **argp));
27 static int do_autocmd_event __ARGS((EVENT_T event, char_u *pat, int nested, char_u *cmd, int forceit, int group));
29 static int au_find_group __ARGS((char_u *name));
30 static EVENT_T event_name2nr __ARGS((char_u *start, char_u **end));
31 static char_u *event_nr2name __ARGS((EVENT_T event));
32 ! static char_u *find_end_event __ARGS((char_u *arg, int have_group));
33 static int event_ignored __ARGS((EVENT_T event));
34 static int au_get_grouparg __ARGS((char_u **argp));
35 static int do_autocmd_event __ARGS((EVENT_T event, char_u *pat, int nested, char_u *cmd, int forceit, int group));
38 * Scan over the events. "*" stands for all events.
47 * Scan over the events. "*" stands for all events.
50 ! find_end_event(arg, have_group)
52 + int have_group; /* TRUE when group name was found */
59 if ((int)event_name2nr(pat, &p) >= (int)NUM_EVENTS)
61 ! EMSG2(_("E216: No such event: %s"), pat);
67 if ((int)event_name2nr(pat, &p) >= (int)NUM_EVENTS)
70 ! EMSG2(_("E216: No such event: %s"), pat);
72 ! EMSG2(_("E216: No such group or event: %s"), pat);
78 * Scan over the events.
79 * If we find an illegal name, return here, don't do anything.
81 ! pat = find_end_event(arg);
86 * Scan over the events.
87 * If we find an illegal name, return here, don't do anything.
89 ! pat = find_end_event(arg, group != AUGROUP_ALL);
95 * Scan over the events.
96 * If we find an illegal name, return here, don't do anything.
98 ! fname = find_end_event(arg);
103 * Scan over the events.
104 * If we find an illegal name, return here, don't do anything.
106 ! fname = find_end_event(arg, group != AUGROUP_ALL);
110 *** ../vim-6.2.043/src/version.c Sun Jul 27 14:16:53 2003
111 --- src/version.c Sun Jul 27 14:18:08 2003
115 { /* Add new patch number below this line */
121 BLACK KNIGHT: The Black Knight always triumphs. Have at you!
122 ARTHUR takes his last leg off. The BLACK KNIGHT's body lands upright.
123 BLACK KNIGHT: All right, we'll call it a draw.
124 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
126 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
127 /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
128 \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
129 \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///