diff options
author | Bram Moolenaar <Bram@vim.org> | 2012-02-12 00:18:58 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2012-02-12 00:18:58 +0100 |
commit | a61d5fbf7ac9bfa0083faa926ad4015bf7125309 (patch) | |
tree | 2741fe445bf4945baefbcd4995dc4b0a1dbe5197 /src | |
parent | 28f2908d95a6c96801ebdb17735242a81295d095 (diff) |
updated for version 7.3.438v7.3.438
Problem: There is no way to avoid ":doautoall" reading modelines.
Solution: Add the <nomodeline> argument. Adjust documentation.
Diffstat (limited to 'src')
-rw-r--r-- | src/fileio.c | 20 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 18 insertions, 4 deletions
diff --git a/src/fileio.c b/src/fileio.c index 8ed878d73b..6d1bbbc174 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -8739,6 +8739,14 @@ ex_doautoall(eap) int retval; aco_save_T aco; buf_T *buf; + char_u *arg = eap->arg; + int call_do_modelines = TRUE; + + if (STRNCMP(arg, "<nomodeline>", 12) == 0) + { + call_do_modelines = FALSE; + arg = skipwhite(arg + 12); + } /* * This is a bit tricky: For some commands curwin->w_buffer needs to be @@ -8755,11 +8763,15 @@ ex_doautoall(eap) aucmd_prepbuf(&aco, buf); /* execute the autocommands for this buffer */ - retval = do_doautocmd(eap->arg, FALSE); + retval = do_doautocmd(arg, FALSE); - /* Execute the modeline settings, but don't set window-local - * options if we are using the current window for another buffer. */ - do_modelines(curwin == aucmd_win ? OPT_NOWIN : 0); + if (call_do_modelines) + { + /* Execute the modeline settings, but don't set window-local + * options if we are using the current window for another + * buffer. */ + do_modelines(curwin == aucmd_win ? OPT_NOWIN : 0); + } /* restore the current window */ aucmd_restbuf(&aco); diff --git a/src/version.c b/src/version.c index 59498a4caa..bce741c093 100644 --- a/src/version.c +++ b/src/version.c @@ -715,6 +715,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 438, +/**/ 437, /**/ 436, |