@@ -102,26 +102,6 @@ function! pathogen#uniq(list) abort " {{{1
102102 return a: list
103103endfunction " }}}1
104104
105- " \ on Windows unless shellslash is set, / everywhere else.
106- function ! pathogen#slash () abort " {{{1
107- return ! exists (" +shellslash" ) || &shellslash ? ' /' : ' \'
108- endfunction " }}}1
109-
110- function ! pathogen#separator () abort " {{{1
111- return pathogen#slash ()
112- endfunction " }}}1
113-
114- " Convenience wrapper around glob() which returns a list.
115- function ! pathogen#glob (pattern) abort " {{{1
116- let files = split (glob (a: pattern )," \n " )
117- return map (files ,' substitute(v:val,"[".pathogen#slash()."/]$","","")' )
118- endfunction " }}}1
119-
120- " Like pathogen#glob(), only limit the results to directories.
121- function ! pathogen#glob_directories (pattern) abort " {{{1
122- return filter (pathogen#glob (a: pattern ),' isdirectory(v:val)' )
123- endfunction " }}}1
124-
125105" Turn filetype detection off and back on again if it was already enabled.
126106function ! pathogen#cycle_filetype () " {{{1
127107 if exists (' g:did_load_filetypes' )
@@ -160,13 +140,6 @@ function! pathogen#surround(path) abort " {{{1
160140 return &rtp
161141endfunction " }}}1
162142
163- " Prepend all subdirectories of path to the rtp, and append all 'after'
164- " directories in those subdirectories. Deprecated.
165- function ! pathogen#runtime_prepend_subdirectories (path ) " {{{1
166- call s: warn (' Change pathogen#runtime_prepend_subdirectories(' .string (a: path ).' ) to pathogen#infect(' .string (a: path .' /{}' ).' )' )
167- return pathogen#surround (a: path . pathogen#slash () . ' {}' )
168- endfunction " }}}1
169-
170143" For each directory in the runtime path, add a second entry with the given
171144" argument appended. If the argument ends in '/{}', add a separate entry for
172145" each subdirectory.
@@ -195,22 +168,6 @@ function! pathogen#interpose(name) abort " {{{1
195168 endfor
196169 let &rtp = pathogen#join (pathogen#uniq (list ))
197170 return 1
198- endfunction " }}}1
199-
200- function ! pathogen#incubate (... ) abort " {{{1
201- let name = a: 0 ? a: 1 : ' bundle/{}'
202- call s: warn (' Change pathogen#incubate(' .(a: 0 ? string (a: 1 ) : ' ' ).' ) to pathogen#infect(' .string (name).' )' )
203- return pathogen#interpose (name)
204- endfunction " }}}1
205-
206- " Deprecated alias for pathogen#interpose().
207- function ! pathogen#runtime_append_all_bundles (... ) abort " {{{1
208- if a: 0
209- call s: warn (' Change pathogen#runtime_append_all_bundles(' .string (a: 1 ).' ) to pathogen#infect(' .string (a: 1 .' /{}' ).' )' )
210- else
211- call s: warn (' Change pathogen#runtime_append_all_bundles() to pathogen#infect()' )
212- endif
213- return pathogen#interpose (a: 0 ? a: 1 . ' /{}' : ' bundle/{}' )
214171endfunction
215172
216173let s: done_bundles = {}
@@ -239,6 +196,39 @@ function! pathogen#execute(...) abort " {{{1
239196 return ' '
240197endfunction " }}}1
241198
199+ " Section: Unofficial
200+
201+ " \ on Windows unless shellslash is set, / everywhere else.
202+ function ! pathogen#slash () abort " {{{1
203+ return ! exists (" +shellslash" ) || &shellslash ? ' /' : ' \'
204+ endfunction " }}}1
205+
206+ function ! pathogen#separator () abort " {{{1
207+ return pathogen#slash ()
208+ endfunction " }}}1
209+
210+ " Convenience wrapper around glob() which returns a list.
211+ function ! pathogen#glob (pattern) abort " {{{1
212+ let files = split (glob (a: pattern )," \n " )
213+ return map (files ,' substitute(v:val,"[".pathogen#slash()."/]$","","")' )
214+ endfunction " }}}1
215+
216+ " Like pathogen#glob(), only limit the results to directories.
217+ function ! pathogen#glob_directories (pattern) abort " {{{1
218+ return filter (pathogen#glob (a: pattern ),' isdirectory(v:val)' )
219+ endfunction " }}}1
220+
221+ " Backport of fnameescape().
222+ function ! pathogen#fnameescape (string ) abort " {{{1
223+ if exists (' *fnameescape' )
224+ return fnameescape (a: string )
225+ elseif a: string == # ' -'
226+ return ' \-'
227+ else
228+ return substitute (escape (a: string ," \t \n *?[{`$\\ %#'\" |!<" ),' ^[+>]' ,' \\&' ,' ' )
229+ endif
230+ endfunction " }}}1
231+
242232" Like findfile(), but hardcoded to use the runtimepath.
243233function ! pathogen#runtime_findfile (file ,count ) abort " {{{1
244234 let rtp = pathogen#join (1 ,pathogen#split (&rtp ))
@@ -250,15 +240,29 @@ function! pathogen#runtime_findfile(file,count) abort "{{{1
250240 endif
251241endfunction " }}}1
252242
253- " Backport of fnameescape().
254- function ! pathogen#fnameescape (string ) abort " {{{1
255- if exists (' *fnameescape' )
256- return fnameescape (a: string )
257- elseif a: string == # ' -'
258- return ' \-'
243+ " Section: Deprecated
244+
245+ " Prepend all subdirectories of path to the rtp, and append all 'after'
246+ " directories in those subdirectories. Deprecated.
247+ function ! pathogen#runtime_prepend_subdirectories (path ) " {{{1
248+ call s: warn (' Change pathogen#runtime_prepend_subdirectories(' .string (a: path ).' ) to pathogen#infect(' .string (a: path .' /{}' ).' )' )
249+ return pathogen#surround (a: path . pathogen#slash () . ' {}' )
250+ endfunction " }}}1
251+
252+ function ! pathogen#incubate (... ) abort " {{{1
253+ let name = a: 0 ? a: 1 : ' bundle/{}'
254+ call s: warn (' Change pathogen#incubate(' .(a: 0 ? string (a: 1 ) : ' ' ).' ) to pathogen#infect(' .string (name).' )' )
255+ return pathogen#interpose (name)
256+ endfunction " }}}1
257+
258+ " Deprecated alias for pathogen#interpose().
259+ function ! pathogen#runtime_append_all_bundles (... ) abort " {{{1
260+ if a: 0
261+ call s: warn (' Change pathogen#runtime_append_all_bundles(' .string (a: 1 ).' ) to pathogen#infect(' .string (a: 1 .' /{}' ).' )' )
259262 else
260- return substitute ( escape ( a: string , " \t \n *?[{`$ \\ %#' \" |!< " ), ' ^[+>] ' , ' \\& ' , ' ' )
263+ call s: warn ( ' Change pathogen#runtime_append_all_bundles() to pathogen#infect() ' )
261264 endif
265+ return pathogen#interpose (a: 0 ? a: 1 . ' /{}' : ' bundle/{}' )
262266endfunction " }}}1
263267
264268if exists (' :Vedit' )
0 commit comments