comparison src/fileio.c @ 14157:3c05b52ffad8 v8.1.0096

patch 8.1.0096: inconsistent use of the word autocommands commit https://github.com/vim/vim/commit/8c55533c6f109db2a0fff69651887f9474eb09c6 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jun 22 21:30:31 2018 +0200 patch 8.1.0096: inconsistent use of the word autocommands Problem: Inconsistent use of the word autocommands. Solution: Don't use auto-commands or "auto commands".
author Christian Brabandt <cb@256bit.org>
date Fri, 22 Jun 2018 21:45:05 +0200
parents e124262d435e
children 977cab3d5474
comparison
equal deleted inserted replaced
14156:03824af50785 14157:3c05b52ffad8
8410 * 8410 *
8411 * :autocmd <event> <pat> <cmd> Add <cmd> to the list of commands that 8411 * :autocmd <event> <pat> <cmd> Add <cmd> to the list of commands that
8412 * will be automatically executed for <event> 8412 * will be automatically executed for <event>
8413 * when editing a file matching <pat>, in 8413 * when editing a file matching <pat>, in
8414 * the current group. 8414 * the current group.
8415 * :autocmd <event> <pat> Show the auto-commands associated with 8415 * :autocmd <event> <pat> Show the autocommands associated with
8416 * <event> and <pat>. 8416 * <event> and <pat>.
8417 * :autocmd <event> Show the auto-commands associated with 8417 * :autocmd <event> Show the autocommands associated with
8418 * <event>. 8418 * <event>.
8419 * :autocmd Show all auto-commands. 8419 * :autocmd Show all autocommands.
8420 * :autocmd! <event> <pat> <cmd> Remove all auto-commands associated with 8420 * :autocmd! <event> <pat> <cmd> Remove all autocommands associated with
8421 * <event> and <pat>, and add the command 8421 * <event> and <pat>, and add the command
8422 * <cmd>, for the current group. 8422 * <cmd>, for the current group.
8423 * :autocmd! <event> <pat> Remove all auto-commands associated with 8423 * :autocmd! <event> <pat> Remove all autocommands associated with
8424 * <event> and <pat> for the current group. 8424 * <event> and <pat> for the current group.
8425 * :autocmd! <event> Remove all auto-commands associated with 8425 * :autocmd! <event> Remove all autocommands associated with
8426 * <event> for the current group. 8426 * <event> for the current group.
8427 * :autocmd! Remove ALL auto-commands for the current 8427 * :autocmd! Remove ALL autocommands for the current
8428 * group. 8428 * group.
8429 * 8429 *
8430 * Multiple events and patterns may be given separated by commas. Here are 8430 * Multiple events and patterns may be given separated by commas. Here are
8431 * some examples: 8431 * some examples:
8432 * :autocmd bufread,bufenter *.c,*.h set tw=0 smartindent noic 8432 * :autocmd bufread,bufenter *.c,*.h set tw=0 smartindent noic
8532 * Print header when showing autocommands. 8532 * Print header when showing autocommands.
8533 */ 8533 */
8534 if (!forceit && *cmd == NUL) 8534 if (!forceit && *cmd == NUL)
8535 { 8535 {
8536 /* Highlight title */ 8536 /* Highlight title */
8537 MSG_PUTS_TITLE(_("\n--- Auto-Commands ---")); 8537 MSG_PUTS_TITLE(_("\n--- Autocommands ---"));
8538 } 8538 }
8539 8539
8540 /* 8540 /*
8541 * Loop over the events. 8541 * Loop over the events.
8542 */ 8542 */
9600 * Set the name to be used for <amatch>. 9600 * Set the name to be used for <amatch>.
9601 */ 9601 */
9602 autocmd_match = fname; 9602 autocmd_match = fname;
9603 9603
9604 9604
9605 /* Don't redraw while doing auto commands. */ 9605 /* Don't redraw while doing autocommands. */
9606 ++RedrawingDisabled; 9606 ++RedrawingDisabled;
9607 save_sourcing_name = sourcing_name; 9607 save_sourcing_name = sourcing_name;
9608 sourcing_name = NULL; /* don't free this one */ 9608 sourcing_name = NULL; /* don't free this one */
9609 save_sourcing_lnum = sourcing_lnum; 9609 save_sourcing_lnum = sourcing_lnum;
9610 sourcing_lnum = 0; /* no line number here */ 9610 sourcing_lnum = 0; /* no line number here */
9853 ? (match_file_pat(NULL, &ap->reg_prog, apc->fname, 9853 ? (match_file_pat(NULL, &ap->reg_prog, apc->fname,
9854 apc->sfname, apc->tail, ap->allow_dirs)) 9854 apc->sfname, apc->tail, ap->allow_dirs))
9855 : ap->buflocal_nr == apc->arg_bufnr) 9855 : ap->buflocal_nr == apc->arg_bufnr)
9856 { 9856 {
9857 name = event_nr2name(apc->event); 9857 name = event_nr2name(apc->event);
9858 s = _("%s Auto commands for \"%s\""); 9858 s = _("%s Autocommands for \"%s\"");
9859 sourcing_name = alloc((unsigned)(STRLEN(s) 9859 sourcing_name = alloc((unsigned)(STRLEN(s)
9860 + STRLEN(name) + ap->patlen + 1)); 9860 + STRLEN(name) + ap->patlen + 1));
9861 if (sourcing_name != NULL) 9861 if (sourcing_name != NULL)
9862 { 9862 {
9863 sprintf((char *)sourcing_name, s, 9863 sprintf((char *)sourcing_name, s,