Commits

ZyX_I  committed de9158c

Replaced all `==#' with `is#'

  • Participants
  • Parent commits 888b361

Comments (0)

Files changed (7)

File plugin/frawor.vim

     let idx1=s:selfdeps[plid1]
     let idx2=s:selfdeps[plid2]
     if idx1==idx2
-        if plid1==#plid2
+        if plid1 is# plid2
             return ((a:feature1.id>a:feature2.id)?(1):(-1))
         endif
         return ((plid1>plid2)?(1):(-1))
     endif
     "▶2 Checking for double registration
     if has_key(s:pls, plid)
-        if s:pls[plid].runtimepath==#plrtp
+        if s:pls[plid].runtimepath is# plrtp
             call s:_f.throw('doublereg', plid)
         endif
         if plugtype[0]!=#'/'

File plugin/frawor/decorators.vim

 "▶1 rewritefname    :: sid, Funcref → funcname
 function s:F.rewritefname(sid, Fref)
     let fstr=string(a:Fref)[10:-3]
-    if fstr[:1]==#'s:'
+    if fstr[:1] is# 's:'
         let fstr='<SNR>'.a:sid.'_'.fstr[2:]
     endif
     return fstr
 "▶1 refunction      :: sid, Funcref, throwargs → Funcref
 function s:F.refunction(sid, Fref, ...)
     let fstr=s:F.rewritefname(a:sid, a:Fref)
-    if string(+fstr)==#fstr
+    if string(+fstr) is# fstr
         return a:Fref
     else
         if !exists('*'.fstr)

File plugin/frawor/decorators/altervars.vim

 "▶1 rewritefname    :: sid, Funcref → funcname
 function s:F.rewritefname(sid, Fref)
     let fstr=string(a:Fref)[10:-3]
-    if fstr[:1]==#'s:'
+    if fstr[:1] is# 's:'
         let fstr='<SNR>'.a:sid.'_'.fstr[2:]
     endif
     return fstr
 "▶1 refunction      :: sid, Funcref, throwargs → Funcref
 function s:F.refunction(sid, Fref, ...)
     let fstr=s:F.rewritefname(a:sid, a:Fref)
-    if string(+fstr)==#fstr
+    if string(+fstr) is# fstr
         return a:Fref
     else
         if !exists('*'.fstr)
         if vnlen<2
             call s:_f.throw('invvnlen', a:fname, plid, i)
         "▶2 Process variables
-        elseif varname[1]==#':' && index(['g','b','t','w'], varname[0])!=-1
+        elseif varname[1] is# ':' && index(['g','b','t','w'], varname[0])!=-1
             "▶3 Check variable name
             if varname[2:]!~#'^\h\w*$'
                 call s:_f.throw('invvname', a:fname, plid, i, varname[2:])
                         \         'let '.varname.'=@$@.'.i,
                         \     'endif',]
         "▶2 Process options
-        elseif varname[0]==#'&' && vnlen>3
+        elseif varname[0] is# '&' && vnlen>3
             "▶3 Check option name
-            if varname[2]!=#':' || !(varname[1]==#'g' || varname[1]==#'l')
+            if varname[2]!=#':' || !(varname[1] is# 'g' || varname[1] is# 'l')
                 call s:_f.throw('noocpref', a:fname, plid, i, varname)
             elseif varname[3:]!~#'^\l\+$'
                 call s:_f.throw('invoname', a:fname, plid, i, varname[3:])
                 let postret+=['let '.varname.'='.ovarname]
             endif
         "▶2 Process special
-        elseif varname[0]==#'+'
+        elseif varname[0] is# '+'
             "▶3 *args, varname
             let saveargs=''
             let setargs=fpref."[".i."][1]"

File plugin/frawor/functions.vim

     else
         let fstr=a:Fref
     endif
-    if fstr[:1]==#'s:'
+    if fstr[:1] is# 's:'
         let fstr='<SNR>'.a:sid.'_'.fstr[2:]
-    elseif fstr[:4]==#'<SID>'
+    elseif fstr[:4] is# '<SID>'
         let fstr='<SNR>'.a:sid.'_'.fstr[5:]
     endif
     return fstr
 "▶1 refunction      :: sid, Funcref, throwargs → Funcref
 function s:F.refunction(sid, Fref, ...)
     let fstr=s:F.rewritefname(a:sid, a:Fref)
-    if string(+fstr)==#fstr
+    if string(+fstr) is# fstr
         return a:Fref
     else
         if !exists('*'.fstr)
 "▶1 delfunction     :: sid, Funcref → + :delfunction
 function s:F.delfunction(sid, Fref)
     let fstr=s:F.rewritefname(a:sid, a:Fref)
-    if string(+fstr)==#fstr || fstr=~#'^[a-z_]\+$'
+    if string(+fstr) is# fstr || fstr=~#'^[a-z_]\+$'
         return 3
     elseif !exists('*'.fstr)
         return 2
             call s:_f.throw('foptsnotdict', fname, a:plugdict.id)
         endif
         "▶2 Replace s: prefix with <SNR>{SID}_
-        if fname[:1]==#'s:'
+        if fname[:1] is# 's:'
             let fstr='<SNR>'.a:sid.'_'.fstr[2:]
         endif
         "▶2 Check function name

File plugin/frawor/fwc/compiler.vim

 endfunction
 "▶1 addsavemsgs     :: &self
 function s:compiler.addsavemsgs()
-    if self.msgs.statuses==#['return']
+    if self.msgs.statuses is# ['return']
         call add(self.msgs.savevars, [0, 0])
         return self
     else

File plugin/frawor/fwc/intfuncs.vim

     if a:i<0
         return []
     endif
-    let dotfragment=(a:fragments[a:i]==#'.' || a:fragments[a:i]==#'..')
+    let dotfragment=(a:fragments[a:i] is# '.' || a:fragments[a:i] is# '..')
                 \   && (a:i<len(a:fragments)-1)
     let glist=[]
     if dotfragment
 endfunction
 "▶2 recupglob
 function s:F.recupglob(files, fragments, i)
-    let dotfragment=(a:fragments[a:i]==#'.' || a:fragments[a:i]==#'..')
+    let dotfragment=(a:fragments[a:i] is# '.' || a:fragments[a:i] is# '..')
     let glist=[]
     if dotfragment
         let glist=[join(a:fragments[:(a:i)], s:g.plug.file.pathseparator)]
     for value in list
         if type(value)==type('')
             if ((a:ignorecase)?(value[:(lstr)]==?a:str):
-                        \      (value[:(lstr)]==#a:str))
+                        \      (value[:(lstr)] is# a:str))
                 if a:acceptfirst is 1
                     return value
                 elseif empty(r)

File plugin/frawor/mappings.vim

         let noremap=0
         let buffer=0
         let lrhs=len(rhs)
-        call filter(maplines, 'v:val[-'.lrhs.':]==#rhs')
+        call filter(maplines, 'v:val[-'.lrhs.':] is# rhs')
         if empty(maplines)
-            if rhs==#'<Nop>'
+            if rhs is# '<Nop>'
                 return 0
             endif
         else
-            let noremap=(maplines[0][(-lrhs-2):][0]==#'*')
-            let buffer=(maplines[0][(-lrhs-1):][0]==#'@')
+            let noremap=(maplines[0][(-lrhs-2):][0] is# '*')
+            let buffer=(maplines[0][(-lrhs-1):][0] is# '@')
         endif
         if buffer
             let buffer=bufnr('%')
                 elseif has_key(mdict, mdid)
                     " XXX it is workaround for the problem which occures if both 
                     " FileType and BufEnter events are called.
-                    if mdict[mdid].mgid==#a:mgroup.id && mdict[mdid].id==#map.id
+                    if mdict[mdid].mgid is# a:mgroup.id && mdict[mdid].id is# map.id
                         continue
                     endif
                     call s:_f.warn('mapcol', (map.id), a:mgroup.id,
 endfunction
 "▶1 strfunc       :: key → (-1|3, 0, 0)
 function s:F.strfunc(key)
-    if key==#"\<CR>" || key==#"\n"
+    if key is# "\<CR>" || key is# "\n"
         return [-1, 0, 0]
     endif
     return [3, 0, 0]
     let mrargs=s:mrargs
     unlet s:mrargs
     call add(mrargs, a:mtype)
-    if mrargs[2]==#'x' || mrargs[2]==#'s'
+    if mrargs[2] is# 'x' || mrargs[2] is# 's'
         call add(mrargs, getpos("'<"))
         call add(mrargs, getpos("'>"))
     else
     "▲3
     let mgroup=s:mgroups[a:mgid]
     "▶3 Check mgroup and a:1
-    if !(a:plugdict.id==#mgroup.plid ||
+    if !(a:plugdict.id is# mgroup.plid ||
                 \has_key(a:plugdict.dependencies, mgroup.plid))
         call s:_f.throw('mmnounrel', a:mgid, a:plugdict.id, mgroup.plid)
     elseif a:0 && !(type(a:1)==type(0) && bufexists(a:1))
     "▲3
     let mgroup=s:mgroups[a:mgid]
     "▶3 Check mgroup and a:1
-    if !(a:plugdict.id==#mgroup.plid ||
+    if !(a:plugdict.id is# mgroup.plid ||
                 \has_key(a:plugdict.dependencies, mgroup.plid))
         call s:_f.throw('umnounrel', a:mgid, a:plugdict.id, mgroup.plid)
     elseif a:0 && !(type(a:1)==type(0) && bufexists(a:1))