# HG changeset patch # User Ludovic Chabant # Date 1480206821 28800 # Node ID d566ec6cd2f7791dfd6a2e2de357b57359adcda9 # Parent 3f15dabaa9f4bfc46d5d36d26546ee484597166a# Parent 3459a2522a3bc4fa885cf71e507476c31811ea9a Merge changes. diff -r 3459a2522a3b -r d566ec6cd2f7 autoload/gutentags.vim --- a/autoload/gutentags.vim Tue Nov 15 12:50:48 2016 +0800 +++ b/autoload/gutentags.vim Sat Nov 26 16:33:41 2016 -0800 @@ -183,8 +183,8 @@ endif " Let the user specify custom ways to disable Gutentags. - if g:gutentags_enabled_user_func != '' && - \!call(g:gutentags_enabled_user_func, [expand('%:p')]) + if g:gutentags_init_user_func != '' && + \!call(g:gutentags_init_user_func, [expand('%:p')]) call gutentags#trace("Ignoring '" . bufname('%') . "' because of " . \"custom user function.") return diff -r 3459a2522a3b -r d566ec6cd2f7 autoload/gutentags/ctags.vim --- a/autoload/gutentags/ctags.vim Tue Nov 15 12:50:48 2016 +0800 +++ b/autoload/gutentags/ctags.vim Sat Nov 26 16:33:41 2016 -0800 @@ -17,8 +17,9 @@ function! gutentags#ctags#init(project_root) abort " Figure out the path to the tags file. + let l:tagfile = getbufvar("", 'gutentags_tagfile', g:gutentags_tagfile) let b:gutentags_files['ctags'] = gutentags#get_cachefile( - \a:project_root, g:gutentags_tagfile) + \a:project_root, l:tagfile) " Set the tags file for Vim to use. if g:gutentags_auto_set_tags diff -r 3459a2522a3b -r d566ec6cd2f7 doc/gutentags.txt --- a/doc/gutentags.txt Tue Nov 15 12:50:48 2016 +0800 +++ b/doc/gutentags.txt Sat Nov 26 16:33:41 2016 -0800 @@ -237,7 +237,7 @@ Specifies the ctags executable to launch for a project of type {type}. See |gutentags_project_info| for more information. - IMPORTANT: piease see |gutentags-ctags-requirements|. + IMPORTANT: please see |gutentags-ctags-requirements|. Example: > let g:gutentags_ctags_executable_ruby = 'foobar' < @@ -387,15 +387,23 @@ part of the project. Defaults to 0. - *gutentags_enabled_user_func* -g:gutentags_enabled_user_func + *gutentags_init_user_func* +g:gutentags_init_user_func When set to a non-empty string, it is expected to be the name of a function that will be called when a file is opened in a project. The function gets passed the path of the file and if it returns 0, Gutentags won't be enabled for that file. - You can use this also to manually set `b:gutentags_root` - (see |gutentags_project_root|). + + You can use this to manually set buffer-local + settings: + + * `b:gutentags_tagfile` (see |gutentags_tagfile|). + + This setting was previously called + `gutentags_enabled_user_func`. The old setting is + still used as a fallback. + Defaults to "". *gutentags_define_advanced_commands* diff -r 3459a2522a3b -r d566ec6cd2f7 plugin/gutentags.vim --- a/plugin/gutentags.vim Tue Nov 15 12:50:48 2016 +0800 +++ b/plugin/gutentags.vim Sat Nov 26 16:33:41 2016 -0800 @@ -24,9 +24,11 @@ let g:gutentags_background_update = get(g:, 'gutentags_background_update', 1) let g:gutentags_pause_after_update = get(g:, 'gutentags_pause_after_update', 0) let g:gutentags_enabled = get(g:, 'gutentags_enabled', 1) -let g:gutentags_enabled_user_func = get(g:, 'gutentags_enabled_user_func', '') let g:gutentags_modules = get(g:, 'gutentags_modules', ['ctags']) +let g:gutentags_init_user_func = get(g:, 'gutentags_init_user_func', + \get(g:, 'gutentags_enabled_user_func', '')) + let g:gutentags_add_default_project_roots = get(g:, 'gutentags_add_default_project_roots', 1) let g:gutentags_project_root = get(g:, 'gutentags_project_root', []) if g:gutentags_add_default_project_roots