summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorJoshua Watt <JPEWhacker@gmail.com>2023-07-28 09:59:31 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-07-29 13:26:19 +0100
commit231b7099e5979ac31b8c178de4e68f7a7269b404 (patch)
tree923f80ef8d272c1a869814694e0dfaa4332b956a /bitbake
parentd8a51fd6288b54c2fe9d08a65a50e2d8cd38b91b (diff)
downloadpoky-231b7099e5979ac31b8c178de4e68f7a7269b404.tar.gz
bitbake: contrib: vim: Fix up a few errors when reloading
Fixes a few errors when the bitbake indent plugin is reloaded: 1) Define functions with "!" so that vim doens't issue a warning when they are replaced 2) Rename GetPythonIndent -> GetBBPythonIndent to prevent potential conflict with other plugins (Bitbake rev: b7109acb96e416e3c537b6b51f7c1fec2ca89371) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/contrib/vim/indent/bitbake.vim6
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/contrib/vim/indent/bitbake.vim b/bitbake/contrib/vim/indent/bitbake.vim
index 1381034098..7ee9d69938 100644
--- a/bitbake/contrib/vim/indent/bitbake.vim
+++ b/bitbake/contrib/vim/indent/bitbake.vim
@@ -40,7 +40,7 @@ set cpo&vim
40 40
41let s:maxoff = 50 " maximum number of lines to look backwards for () 41let s:maxoff = 50 " maximum number of lines to look backwards for ()
42 42
43function GetPythonIndent(lnum) 43function! GetBBPythonIndent(lnum)
44 44
45 " If this line is explicitly joined: If the previous line was also joined, 45 " If this line is explicitly joined: If the previous line was also joined,
46 " line it up with that one, otherwise add two 'shiftwidth' 46 " line it up with that one, otherwise add two 'shiftwidth'
@@ -257,7 +257,7 @@ let b:did_indent = 1
257setlocal indentkeys+=0\" 257setlocal indentkeys+=0\"
258 258
259 259
260function BitbakeIndent(lnum) 260function! BitbakeIndent(lnum)
261 if !has('syntax_items') 261 if !has('syntax_items')
262 return -1 262 return -1
263 endif 263 endif
@@ -315,7 +315,7 @@ function BitbakeIndent(lnum)
315 endif 315 endif
316 316
317 if index(["bbPyDefRegion", "bbPyFuncRegion"], name) != -1 317 if index(["bbPyDefRegion", "bbPyFuncRegion"], name) != -1
318 let ret = GetPythonIndent(a:lnum) 318 let ret = GetBBPythonIndent(a:lnum)
319 " Should normally always be indented by at least one shiftwidth; but allow 319 " Should normally always be indented by at least one shiftwidth; but allow
320 " return of -1 (defer to autoindent) or -2 (force indent to 0) 320 " return of -1 (defer to autoindent) or -2 (force indent to 0)
321 if ret == 0 321 if ret == 0