Commits

ZyX_I committed 888b361

Replaced all `is's used for string comparison with `is#'

Comments (0)

Files changed (18)

plugin/frawor.vim

         return s:prefixes[prefix].a:str[len(prefix):]
     elseif !a:0
         call s:_f.throw('npref', prefix)
-    elseif prefix is '@^'
+    elseif prefix is# '@^'
         return matchstr(a:1, '\m.*/').a:str[2:]
-    elseif prefix is '@.'
+    elseif prefix is# '@.'
         return a:1.a:str[2:]
     else
         return s:prefixes[prefix].a:str[len(prefix):]
     "▶3 Processing dictionary supplied instead of plugin ID
     elseif type(a:plid)==type({})
         if has_key(a:plid, 'id') && type(a:plid.id)==type('') &&
-                    \has_key(s:pls, a:plid.id) && s:pls[a:plid.id] is a:plid
+                    \has_key(s:pls, a:plid.id) && s:pls[a:plid.id] is# a:plid
             let plid=a:plid.id
             let plugdict=a:plid
         else
         unlet plid
     elseif type(a:plid)==type({})
         if has_key(a:plid, 'id') && type(a:plid.id)==type("") &&
-                    \has_key(s:pls, a:plid.id) && s:pls[a:plid.id] is a:plid
+                    \has_key(s:pls, a:plid.id) && s:pls[a:plid.id] is# a:plid
             let plugdict=a:plid
         else
             call s:_f.throw('invplugdict')
             if has_key(s:dependents, plugdict.id)
                 unlet s:dependents[plugdict.id]
             endif
-            call map(s:dependents, 'filter(v:val, "v:key isnot plugdict.id")')
+            call map(s:dependents, 'filter(v:val, "v:key isnot# plugdict.id")')
             "▲2
             unlockvar plugdict.g
             call map(keys(plugdict.g), 'remove(plugdict.g, v:val)')
     let addedsomething=0
     for key in s:featfunckeys
         if has_key(a:fopts, key)
-            if key is 'cons'
+            if key is# 'cons'
                 if type(a:fopts[key])==type({})
                     call s:F.recdictmap(deepcopy(a:fopts[key]),
                                 \'s:F.isfunc(v:val, '.

plugin/frawor/autocommands.vim

                 call s:_f.throw('emptycmd', i, a:agid, a:plugdict.id)
             endif
             "▲3
-            let augroup.args[i]=d.command[1:]
-            let d.command=d.command[0]
+            let [d.command; augroup.args[i]]=d.command
         endif
         if exists("*d.command")
             let augroup.funcs[i]=d.command

plugin/frawor/commands.vim

         let a:plugdict.g._commands=[]
     endif
 endfunction
-"▶1 delcommands  :: {f} + p:_commands → + :autocmd, p:_commands
+"▶1 delcommands  :: {f} + p:_commands → + :delcommand, p:_commands
 function s:F.delcommands(plugdict, fdict)
     if !has_key(a:plugdict.g, '_commands') ||
                 \type(a:plugdict.g._commands)!=type([])
     let d={}
     while !empty(a:plugdict.g._commands)
         let d.cmdname=remove(a:plugdict.g._commands, 0)
-        if type(d.cmdname)==type("") && d.cmdname=~#'^\u' &&
+        if type(d.cmdname)==type('') && d.cmdname=~#'^\u' &&
                     \exists(':'.d.cmdname)==2
-            execute "delcommand" d.cmdname
+            execute 'delcommand' d.cmdname
         endif
     endwhile
 endfunction

plugin/frawor/functions.vim

     let b=a:b[2]
     if a==b
         call s:_f.warn('deceqpri', a:a[0], a:b[0])
-        return ((sort([a:a[0], a:b[0]]) is a:a[0])?(-1):(1))
+        return ((a:a[0]>#a:b[0])?(-1):(1))
     endif
     return ((a>b)?(-1):(1))
 endfunction
     let func=["function ".fname."(...)",
                 \'let _={"d": {}, "F": '.fpref.'.function}',
                 \]
-    let decs=map(filter(keys(a:funopts), 'v:val[0] is "@"'),
+    let decs=map(filter(keys(a:funopts), 'v:val[0] is# "@"'),
                 \'s:_r.getdecorator(v:val[1:])')
     let fblocks=[]
     let addedrval=0

plugin/frawor/fwc/compiler.vim

             if !has_key(sq, arg[0])
                 let sq[arg[0]]=[]
             endif
-            if arg[0] is 'actions' || arg[0] is 'prefixes'
-                if get(get(arg, 1, []), 0, '') is 'matcher'
+            if arg[0] is# 'actions' || arg[0] is# 'prefixes'
+                if get(get(arg, 1, []), 0, '') is# 'matcher'
                     let sq[arg[0].'matcher']=remove(arg, 1)
                 endif
                 call extend(sq[arg[0]], filter(map(arg[1:], 'v:val[1:]'),
                             \                  '!empty(v:val)'))
-            elseif arg[0] is 'next'
+            elseif arg[0] is# 'next'
                 if len(arg[1:][0])>1
                     call add(sq[arg[0]], arg[1:][0][1:])
                 endif
-            elseif arg[0] is 'optional'
+            elseif arg[0] is# 'optional'
                 if len(arg)>1
                     call add(sq[arg[0]], arg)
                 endif
 "▶1 fail            :: &self
 function s:compiler.fail()
     let msgstatus=self.msgs.statuses[-1]
-    if msgstatus is 'return'
+    if msgstatus is# 'return'
         return self[self.failcal[0]](self.failcal[1]).up()
     else
         return self.throw(s:cfstr)
         let self.vars[a:name]={}
     endif
     if a:0 && a:1!~#'\v^\x*$' && ((has_key(self.vars[a:name], a:1))?
-                \                   (self.vars[a:name][a:1] is a:init):
+                \                   (self.vars[a:name][a:1] is# a:init):
                 \                   (1))
         let id=a:1
     else
     let args=[]
     let added000=0
     for arg in a:func[2:]
-        if a:0 && arg[0] is 'this'
+        if a:0 && arg[0] is# 'this'
             let args+=a:000
             let added000=1
         else
 function s:compiler.getvar(var, ...)
     let r=[]
     let splitsubs=get(a:000, 0, 0)
-    if a:var[0] is 'plugvar'
+    if a:var[0] is# 'plugvar'
         let r=['@%@.p.'.a:var[1], a:var[2:]]
-    elseif a:var[0] is 'expr'
+    elseif a:var[0] is# 'expr'
         let r=[self.getexpr(a:var)]
-    elseif a:var[0] is 'string'
+    elseif a:var[0] is# 'string'
         let r=[self.string(a:var[1])]
-    elseif a:var[0] is 'argument'
+    elseif a:var[0] is# 'argument'
         let r=[self.argbase, [self.subs[0]+a:var[1]]+a:var[2:]]
-    elseif a:var[0] is 'cur'
+    elseif a:var[0] is# 'cur'
         let r=[self.argbase, self.subs[:-1-a:var[1]]+a:var[2:]]
-    elseif a:var[0] is 'list'
+    elseif a:var[0] is# 'list'
         let r=['['.join(map(a:var[1:], 'type(v:val)=='.type('').'?'.
                     \                       'self.string(v:val):'.
                     \                       'self.getvar(v:val)'), ', ').']']
-    elseif a:var[0] is 'evaluate'
+    elseif a:var[0] is# 'evaluate'
         let r=[eval(substitute(self.getvar(a:var[1]), '@%@', 'self.vars', 'g'))]
         if type(r[0])!=type('')
             let r[0]=self.string(r[0])
         endif
-    elseif a:var[0] is 'func'
+    elseif a:var[0] is# 'func'
         let r=[call(self.getfunc, [a:var, 0]+a:000[1:], self)]
-    elseif a:var[0] is 'this'
+    elseif a:var[0] is# 'this'
         let r=[self.argbase, self.subs]
     endif
     return ((splitsubs)?(r):(r[0].((len(r)>1)?(self.getsubs(r[1])):(''))))
         let pargs=self.msgs.own[-1]
     endif
     let msgstatus=self.msgs.statuses[-1]
-    if msgstatus is 'return'
+    if msgstatus is# 'return'
         if exists('pargs')
             call self.call('@%@.p._f.warn('.pargs.')')
         endif
         call self.call('@%@.F.warn('.args.')')
-    elseif msgstatus is 'throw'
+    elseif msgstatus is# 'throw'
         if exists('pargs')
             call self.call('add(@$@pmessages, ['.pargs.'])')
         endif
         call self.call('add(@$@messages, ['.args.'])')
-    elseif msgstatus is 'throwignore'
+    elseif msgstatus is# 'throwignore'
         " Ignore and fail
     endif
     return self.fail()
 endfunction
 "▶1 addtypecond     :: &self(types, idx)
 function s:compiler.addtypecond(types, idx)
-    if self.o.onlystrings && self.argbase is '@@@' && len(self.subs)==1
+    if self.o.onlystrings && self.argbase is# '@@@' && len(self.subs)==1
         if index(a:types, type(''))==-1
             call self.nextthrow(1, 'nostrings', a:idx)
         endif
 function s:compiler.optgetconds()
     if len(self.l)==2
                 \&& len(self.l[0])>2
-                \&& self.l[0][0] is 'if'
-                \&& ((self.l[0][-1] is 'endif'
+                \&& self.l[0][0] is# 'if'
+                \&& ((self.l[0][-1] is# 'endif'
                 \  && self.l[0][-3] isnot 'else')
                 \ || (self.l[0][-2] isnot 'else'))
         let conditions=[]
         let iftree=copy(self.l[0])
         while !empty(iftree)
             let type=remove(iftree, 0)
-            if type is 'if' || type is 'elseif'
+            if type is# 'if' || type is# 'elseif'
                 let [condition, block]=remove(iftree, 0, 1)
                 if block!=#[['throw', s:cfstr]]
                     return 0
                 endif
                 call add(conditions, condition)
-            elseif type is 'endif'
+            elseif type is# 'endif'
                 break
             else
                 return 0
 endfunction
 "▶1 compilemsg      :: &self(msgcontext, idx, type)
 function s:compiler.compilemsg(msg, idx, type)
-    if a:type is 'complete'
+    if a:type is# 'complete'
         return self
     endif
     if a:msg[1] is 0
     let msg=[]
     let curargstrstr=self.argstr(1)
     for msgarg in a:msg[2:]
-        if msgarg[0] is 'curval'
+        if msgarg[0] is# 'curval'
             call add(msg, self.argstr())
-        elseif msgarg[0] is 'curarg'
+        elseif msgarg[0] is# 'curarg'
             call add(msg, curargstrstr)
-        elseif msgarg[0] is 'curidx'
+        elseif msgarg[0] is# 'curidx'
             call add(msg, self.string(idx))
         else
             call add(msg, substitute(self.getvar(msgarg), '@#@',
 "▶1 compilepipe     :: &self(pipecontext, idx, type)
 function s:compiler.compilepipe(pipe, idx, type)
     "▶2 `func' pipe
-    if a:pipe[1][0] is 'func'
+    if a:pipe[1][0] is# 'func'
         let curargstr=self.argstr()
-        if a:type is 'check' || a:type is 'pipe'
+        if a:type is# 'check' || a:type is# 'pipe'
             call self.let(curargstr, self.getfunc(a:pipe[1],0, curargstr))
             let self.typechanged=1
         endif
     "▶2 `expr' pipe
-    elseif a:pipe[1][0] is 'expr'
+    elseif a:pipe[1][0] is# 'expr'
         let curargstr=self.argstr()
-        if a:type is 'check' || a:type is 'pipe'
+        if a:type is# 'check' || a:type is# 'pipe'
             call self.let(curargstr, self.getexpr(a:pipe[1], curargstr))
             let self.typechanged=1
         endif
     "▶2 Built-in pipes
-    elseif a:pipe[1][0] is 'intfunc'
+    elseif a:pipe[1][0] is# 'intfunc'
         let desc=a:pipe[1][1:]
         let dname=desc[0]
-        if a:type is 'check' || a:type is 'pipe'
+        if a:type is# 'check' || a:type is# 'pipe'
             if has_key(s:_r.FWC_intfuncs[dname], 'pipe')
                 call call(s:_r.FWC_intfuncs[dname].pipe,  [desc,a:idx, 'pipe'],
                             \self)
 "▶1 compilecheck    :: &self(checkcontext, idx, type)
 function s:compiler.compilecheck(check, idx, type)
     "▶2 `func' check
-    if a:check[1][0] is 'func'
-        if a:type is 'check' || a:type is 'pipe'
+    if a:check[1][0] is# 'func'
+        if a:type is# 'check' || a:type is# 'pipe'
             call self.nextthrow(self.getfunc(a:check[1], 0, self.argstr()).
                         \                                               ' is 0',
                         \       'funcfail', a:idx)
         endif
     "▶2 `expr' check
-    elseif a:check[1][0] is 'expr'
-        if a:type is 'check' || a:type is 'pipe'
+    elseif a:check[1][0] is# 'expr'
+        if a:type is# 'check' || a:type is# 'pipe'
             call self.nextthrow(self.getexpr(a:check[1], self.argstr()).' is 0',
                         \       'exprfail', a:idx)
         endif
     else
         let desc=a:check[1][1:]
         let dname=desc[0]
-        if a:type is 'check' || a:type is 'pipe'
+        if a:type is# 'check' || a:type is# 'pipe'
             if !has_key(s:_r.FWC_intfuncs[dname], 'check')
                 call s:_f.throw('ucheck', dname)
             endif
 endfunction
 "▶1 compilecomplete :: &self(completecontext, idx, type)
 function s:compiler.compilecomplete(complete, idx, type)
-    if a:type is 'complete' && !(a:complete[1][0] is 'func' ||
-                \                a:complete[1][0] is 'expr')
+    if a:type is# 'complete' && !(a:complete[1][0] is# 'func' ||
+                \                 a:complete[1][0] is# 'expr')
         let desc=a:complete[1][1:]
         let dname=desc[0]
         if has_key(s:_r.FWC_intfuncs[dname], 'complete')
 endfunction
 "▶1 compilearg      :: &self(argcontext, idx, type)
 function s:compiler.compilearg(argcon, idx, type)
-    if a:argcon[0] is 'arg'
+    if a:argcon[0] is# 'arg'
         let arg=a:argcon[1:]
     else
         let arg=a:argcon
     let msg=[]
     let i=0
     let savedonlystrings=self.o.onlystrings
-    if a:type is 'complete'
+    if a:type is# 'complete'
         let addedcompletion=0
         let addedcycle=0
         let argidxstr=self.getlvarid('argidx')
         let i+=1
         let compargs=[proc, a:idx.'.'.i, a:type]
         let comptype=proc[0]
-        if comptype is 'intfunc'
+        if comptype is# 'intfunc'
             let comptype=a:type
             let compargs[0]=[comptype, compargs[0]]
-        elseif comptype is 'defval'
+        elseif comptype is# 'defval'
             continue
         endif
-        if a:type is 'complete'
+        if a:type is# 'complete'
             if addedcompletion && !addedcycle
                 let addedcycle=1
                 call self.let(argidxstr, 0)
                                 \.try()
                                     \.pushms('throwignore')
                                     \.witharg(['@-@', [[argidxstr]]])
-            elseif compargs[0][1][0] is 'intfunc' &&
+            elseif compargs[0][1][0] is# 'intfunc' &&
                         \has_key(s:_r.FWC_intfuncs[compargs[0][1][1]],
                         \        'breakscomp')
                 break
             let self.o.onlystrings=0
             let self.typechanged=0
         endif
-        if comptype is 'complete'
-            if compargs[0][1][0] is 'intfunc' &&
+        if comptype is# 'complete'
+            if compargs[0][1][0] is# 'intfunc' &&
                         \has_key(s:_r.FWC_intfuncs[compargs[0][1][1]],
                         \        'stopscomp')
                 break
     if len(self.msgs.own)>pmsgnum
         call remove(self.msgs.own, pmsgnum, -1)
     endif
-    if a:type is 'complete' && addedcycle
+    if a:type is# 'complete' && addedcycle
         call self.without().popms()
                     \.increment(argidxstr)
                 \.up().catch(s:cfreg)
     "▶2 Length checks, lagsstr and nextsub variables
     if !empty(self.subs)
         let largsstr=self.getlargsstr()
-        if a:type is 'check' || a:type is 'pipe'
+        if a:type is# 'check' || a:type is# 'pipe'
             if !has_key(a:adescr, 'minimum')
                 call s:F.getlenrange(a:adescr)
             endif
             else
                 let idx=a:idx.'.'.i
             endif
-            if a:type is 'complete' && !self.o.only
+            if a:type is# 'complete' && !self.o.only
                 call self.addif(largsstr.'-1 == '.self.getlastsub())
             endif
             call self.compilearg(arg, idx, a:type)
             call self.incsub()
-            if a:type is 'complete' && !self.o.only
+            if a:type is# 'complete' && !self.o.only
                 call self.up()
             endif
             if self.onlyfirst
                 \'typechanged': 0,
                 \'onlyfirst': 0,
             \})
-    if t.type is 'filter'
+    if t.type is# 'filter'
         let t.type='pipe'
     endif
     call extend(t, s:compiler, 'error')
-    if !(t.type is 'check' || t.type is 'pipe')
+    if !(t.type is# 'check' || t.type is# 'pipe')
         let t.matcher=s:defcompletematcher
         let t.comparg=t.argbase.t.getsubs([-1])
         let t.joinlists=0
     endif
     "▲2
     let [t.o, tree]=s:F.cleanup(s:_r.fwc_parser(a:string)[1:])
-    if a:doreturn is 1
+    if a:doreturn is# 1
         let t.failcal=['return', 0]
     else
         let t.failcal=['call', '@%@.F.throw('.join(map(a:doreturn,
     if !t.o.only
         call add(t.subs, 0)
     endif
-    if t.type is 'check' || t.type is 'pipe'
+    if t.type is# 'check' || t.type is# 'pipe'
         call        t.let('@$@messages',  '[]')
                     \.let('@$@pmessages', '[]')
                     \.try()
     else
         call t.let('@-@', '[]').compadescr(tree, '', t.type)
     endif
-    if a:doreturn is 1
-        if t.type is 'check'
+    if a:doreturn is# 1
+        if t.type is# 'check'
             call t.return(1)
-        elseif t.type is 'pipe'
+        elseif t.type is# 'pipe'
             call t.return('@@@')
         else
             call t.return('@-@')

plugin/frawor/fwc/constructor.vim

 "▶1 addif      :: &self(condition?)
 function s:constructor.addif(...)
     if a:0
-        if get(self.l, 0) is 'if' && get(self.l, -2) isnot 'else' &&
-                    \                get(self.l, -1) isnot 'endif'
+        if get(self.l, 0) is# 'if' && get(self.l, -2) isnot# 'else' &&
+                    \                 get(self.l, -1) isnot# 'endif'
             return self.elseif(a:1)
         else
             return self.if(a:1)
         endif
     else
-        if get(self.l, 0) is 'if'
+        if get(self.l, 0) is# 'if'
             return self.else()
         else
             return self
             call add(r, istr.item)
         else
             let type=remove(item, 0)
-            if type is 'if'
+            if type is# 'if'
                 call add(r, istr.'if '.remove(item, 0))
                 if !empty(item)
                     let toextend+=map(remove(item, 0),'['.(indent+1).', v:val]')
                 endif
                 while !empty(item)
                     let type=remove(item, 0)
-                    if type is 'elseif'
+                    if type is# 'elseif'
                         call add(toextend, [indent, 'elseif '.remove(item, 0)])
-                    elseif type is 'else'
+                    elseif type is# 'else'
                         call add(toextend, [indent, 'else'])
-                    elseif type is 'endif'
+                    elseif type is# 'endif'
                         break
                     endif
                     let toextend+=map(remove(item, 0),'['.(indent+1).', v:val]')
                 endwhile
                 call add(toextend, [indent, 'endif'])
-            elseif type is 'try'
+            elseif type is# 'try'
                 call add(r, istr.'try')
                 if !empty(item)
                     let toextend+=map(remove(item, 0),'['.(indent+1).', v:val]')
                 endif
                 while !empty(item)
                     let type=remove(item, 0)
-                    if type is 'catch'
+                    if type is# 'catch'
                         call add(toextend, [indent, 'catch '.remove(item, 0)])
-                    elseif type is 'finally'
+                    elseif type is# 'finally'
                         call add(toextend, [indent, 'finally'])
-                    elseif type is 'endtry'
+                    elseif type is# 'endtry'
                         break
                     endif
                     let toextend+=map(remove(item, 0),'['.(indent+1).', v:val]')
                 endwhile
                 call add(toextend, [indent, 'endtry'])
-            elseif type is 'while'
+            elseif type is# 'while'
                 call add(r, istr.'while '.remove(item, 0))
                 let toextend+=map(remove(item, 0),'['.(indent+1).', v:val]')
                 call add(toextend, [indent, 'endwhile'])
-            elseif type is 'for'
+            elseif type is# 'for'
                 call add(r, istr.'for '.remove(item, 0).' in '.remove(item, 0))
                 let toextend+=map(remove(item, 0),'['.(indent+1).', v:val]')
                 call add(toextend, [indent, 'endfor'])
-            elseif type is 'let'
+            elseif type is# 'let'
                 call add(r, istr.'let '.remove(item, 0).'='.remove(item, 0))
-            elseif type is 'inc'
+            elseif type is# 'inc'
                 let lhs=remove(item, 0)
                 let assign='+='
                 let shift=remove(item, 0)
                     let shift=-shift
                 endif
                 call add(r, istr.'let '.lhs.assign.shift)
-            elseif       type is 'call'   ||
-                        \type is 'throw'  ||
-                        \type is 'return'
+            elseif       type is# 'call'   ||
+                        \type is# 'throw'  ||
+                        \type is# 'return'
                 call add(r, istr.type.' '.remove(item, 0))
-            elseif type is 'unlet'
+            elseif type is# 'unlet'
                 call add(r, istr.type.' '.join(remove(item, 0)))
-            elseif type is 'continue' || type is 'break'
+            elseif type is# 'continue' || type is# 'break'
                 call add(r, istr.type)
             endif
             if !empty(toextend)

plugin/frawor/fwc/intfuncs.vim

 function s:F.getfiles(arglead, filter, forcefilter)
     let fragments=s:_r.os.path.split(a:arglead)
     let globstart=''
-    if a:arglead[0] is s:_r.os.sep
+    if a:arglead[0] is# s:_r.os.sep
         let globstart=s:_r.os.sep
     endif
-    if a:arglead[-1:] is s:_r.os.sep && get(fragments, -1, 0) isnot ''
+    if a:arglead[-1:] is# s:_r.os.sep && get(fragments, -1, 0) isnot# ''
         call add(fragments, '')
     endif
-    while len(fragments)>1 && (fragments[0] is '.' || fragments[0] is '..')
+    while len(fragments)>1 && (fragments[0] is# '.' || fragments[0] is# '..')
         let globstart.=remove(fragments, 0).s:_r.os.sep
     endwhile
-    let startswithdot = a:arglead[0] is '.'
+    let startswithdot = a:arglead[0] is# '.'
     if empty(fragments)
         call add(fragments, '')
     endif
     endif
     if !startswithdot
         call map(r, 's:_r.os.path.join(filter(s:_r.os.path.split(v:val), '.
-                    \                        '"v:val isnot ''.''"))')
+                    \                        '"v:val isnot# ''.''"))')
     endif
     call map(r, 's:_r.os.path.isdir(v:val)?(v:val.s:_r.os.sep):(v:val)')
     return r
     redir => funlist
     silent function
     redir END
-    return map(map(filter(split(funlist, "\n"), 'v:val[0] is "f"'),
+    return map(map(filter(split(funlist, "\n"), 'v:val[0] is# "f"'),
                 \'split(v:val[9:-2], "(")'),
                 \'[v:val[0]]+split(v:val[1], ", ")')
 endfunction
     let ruler=repeat('=', 78)
     let section=''
     while !empty(help)
-        if remove(help, 0) is ruler
-            if remove(help, 0)[:19] is '4. Builtin Functions'
+        if remove(help, 0) is# ruler
+            if remove(help, 0)[:19] is# '4. Builtin Functions'
                 while !empty(help)
                     let line=remove(help, 0)
                     if empty(line) && !empty(s:vimintfuncs)
 "Filters/checkers --------------------------------------------------------------
 "▶1 `func', `eval'
 let s:r.func={'args': ['func'], 'breakscomp': 1}
-" Checks whether result of running {func}({argument}) isnot 0
+" Checks whether result of running {func}({argument}) isn't 0
 function s:r.func.check(desc, idx, type)
     return self['compile'.a:type](a:desc, a:idx, a:type)
 endfunction
 " Replaces {argument} with the result of running {func}({argument})
 let s:r.func.pipe=s:r.func.check
 " Replaces {argument} with the result of evaluating {expr}
-" Checks whether result of running eval({expr}) isnot 0
+" Checks whether result of running eval({expr}) isn't 0
 let s:r.eval=copy(s:r.func)
 let s:r.eval.args=['expr']
 "▶1 `if'
                 \                              'userfunctions').'()'
     let getintfuncsstr=self.getfunstatvar('completers',s:F.getinternalfunctions,
                 \                         'vimfunctions').'()'
-    if a:desc[1][0] is 'list'
+    if a:desc[1][0] is# 'list'
         " XXX a:desc[1] contains one more items then required, as well as output 
         " of getuserfunctions
         let ldescr=len(a:desc[1])
         return self.addmatches('map(filter('.getuserfunctionsstr.
                     \          ', "len(v:val)=='.ldescr.' || '.
                     \             '(len(v:val)<='.(ldescr+1).' && '.
-                    \              'v:val[-1] is ''...'')"), "v:val[0]")+'.
+                    \              'v:val[-1] is# ''...'')"), "v:val[0]")+'.
                     \          'sort(keys(filter('.getintfuncsstr.', '.
                     \                      '"index(v:val, '.(ldescr-1).')!=-1 '.
                     \                      '|| (v:val[0]==-1 && '.
     let i=-1
     for check in a:dic[1][1:]
         let i+=1
-        if check[0] is 'eq'
-            call self.addif(keystr.' is '.self.string(check[1]))
-        elseif check[0] is 'regex'
+        if check[0] is# 'eq'
+            call self.addif(keystr.' is# '.self.string(check[1]))
+        elseif check[0] is# 'regex'
             call self.addif(keystr.'=~#'.self.string(check[1]))
-        elseif check[0] is 'func'
+        elseif check[0] is# 'func'
             call self.addif(self.getfunc(check[1], 0, keystr).' isnot 0')
-        elseif check[0] is 'expr'
+        elseif check[0] is# 'expr'
             call self.addif(self.getexpr(check[1], keystr).' isnot 0')
-        elseif check[0] is 'any'
+        elseif check[0] is# 'any'
             call self.compilearg(check[1], a:idx.'.'.i.'(val)', a:type)
                         \.continue()
             break
-        elseif check[0] is 'check'
+        elseif check[0] is# 'check'
             if !hascheck
                 call self.addsavemsgs()
             endif
     call self.addcon('ddescr')
     if self.len
         let c=self.readc()
-        if c isnot '{'
+        if c isnot# '{'
             call self.ungetc(c)
         endif
         let prevlen=-1
         while self.len && self.len!=prevlen
             let prevlen=self.len
             let c=self.readc()
-            if c is '}'
+            if c is# '}'
                 break
-            elseif c is '/'
+            elseif c is# '/'
                 call self.addcon('regex', self.readreg('/')).scan().conclose()
-            elseif c is '*'
+            elseif c is# '*'
                 call self.addcon('func').getfunc().scan().conclose()
-            elseif c is '='
+            elseif c is# '='
                 call self.addcon('expr').getexpr().scan().conclose()
-            elseif c is '?'
+            elseif c is# '?'
                 call self.addcon('check').scan().scan().conclose()
-            elseif c is '-'
+            elseif c is# '-'
                 call self.addcon('any').scan().conclose()
-            elseif c is '"'
+            elseif c is# '"'
                 call self.addcon('eq', self.readstr()).scan().conclose()
-            elseif c is "'"
+            elseif c is# "'"
                 call self.addcon('eq', self.readsstr()).scan().conclose()
             elseif c=~#'^\w'
                 call self.addcon('eq', c).scan().conclose()
 " string.
 function s:r.in.pipe(desc, idx, type, ...)
     let curargstr=self.argstr()
-    if len(a:desc)==2 || (a:desc[2][1][0] is 'intfunc' &&
-                \         a:desc[2][1][1] is 'exact' &&
+    if len(a:desc)==2 || (a:desc[2][1][0] is# 'intfunc' &&
+                \         a:desc[2][1][1] is# 'exact' &&
                 \         a:desc[2][1][2] is 0)
         return call(s:r[get(a:000, 0, 'in')].check, [a:desc, a:idx, a:type],
                     \self)
     let curargstr=self.argstr()
     "▶2 Determine whether we accept floating-point values
     let acceptfloat=has('float') &&
-                \(a:desc[3] || a:desc[1][0] is 'float'
-                \           || a:desc[2][0] is 'float')
+                \(a:desc[3] || a:desc[1][0] is# 'float'
+                \           || a:desc[2][0] is# 'float')
     if acceptfloat
         call self.addtypecond([type(0), type(0.0)], a:idx)
     else
     endif
     "▶2 Obtain range borders
     let range=map(a:desc[1:2],
-                \'((v:val[0] is "inf" || v:val[0] is "nan")?'.
+                \'((v:val[0] is# "inf" || v:val[0] is# "nan")?'.
                 \   '(""):'.
-                \   '((v:val[0] is "number"||v:val[0] is "float")?'.
+                \   '((v:val[0] is# "number"||v:val[0] is# "float")?'.
                 \       '(v:val[1]):'.
                 \       '(self.getvar(v:val))))')
     if type(range[0])!=type('') && type(range[1])!=type('') && range[0]>range[1]
     call map(range, '((type(v:val)=='.type('').')?'.
                 \               '(v:val):'.
                 \               '(string(v:val)))')
-    if range[0] isnot ''
+    if range[0] isnot# ''
         let cond.=range[0].'>'.curargstr
     endif
-    if range[1] isnot ''
+    if range[1] isnot# ''
         if !empty(cond)
             let cond.=' || '
         endif
                 \.let(dirnamestr, normpathstr.'('.curargstr.')')
                 \.let(prevdirstr, '""')
                 \.let(foundstr, 0)
-                \.while(dirnamestr.' isnot '.prevdirstr)
+                \.while(dirnamestr.' isnot# '.prevdirstr)
                     \.addif('filewritable('.dirnamestr.')==2')
                         \.let(foundstr, 1)
                         \.break().up()
     let isdirstr=self.getfunstatvar('os', s:_r.os.path.isdir, 'isdir')
     call self.addtypecond([type('')], a:idx)
     let spec=a:desc[1]
-    if spec[0] is 'd'
+    if spec[0] is# 'd'
         let spec=spec[1:]
-        if spec[0] is 'w'
+        if spec[0] is# 'w'
             call self.nextthrow('filewritable('.curargstr.')!=2',
                         \       'nwrite', a:idx, curargstr)
             let spec=spec[1:]
-        elseif spec[0] is 'W'
+        elseif spec[0] is# 'W'
             call self.nextthrow('filewritable('.curargstr.')!=2 &&'.
                         \      '('.existsstr.'('.curargstr.')'.
                         \       '|| filewritable('.dirnamestr.'('.
                         \                                    curargstr.'))!=2)',
                         \      'nowrite', a:idx, curargstr)
             let spec=spec[1:]
-        elseif spec[0] is 'p'
+        elseif spec[0] is# 'p'
             call call(s:r.path.addpathp, [a:idx], self)
                         \.nextthrow('!'.isdirstr.'('.curargstr.')',
                         \           'isdir', a:idx, curargstr)
         endif
     else
         let fileonly=0
-        if spec[0] is 'f'
+        if spec[0] is# 'f'
             let spec=spec[1:]
             let fileonly=1
         endif
         if fileonly
-            if spec[0] is 'r'
+            if spec[0] is# 'r'
                 call self.nextthrow('!filereadable('.curargstr.')',
                             \       'nread', a:idx, curargstr)
                 let spec=spec[1:]
-            elseif spec[-1:] isnot 'x'
+            elseif spec[-1:] isnot# 'x'
                 call self.nextthrow(isdirstr.'('.curargstr.')',
                             \       'isfile', a:idx, curargstr)
             endif
         endif
-        if spec[0] is 'w'
+        if spec[0] is# 'w'
             call self.nextthrow('!filewritable('.curargstr.')',
                         \       'nwrite', a:idx, curargstr)
             let spec=spec[1:]
-        elseif spec[0] is 'W'
+        elseif spec[0] is# 'W'
             call self.nextthrow('!filewritable('.curargstr.') &&'.
                         \      '('.existsstr.'('.curargstr.')'.
                         \       '|| filewritable('.
                         \                     dirnamestr.'('.curargstr.'))!=2)',
                         \      'nowrite', a:idx, curargstr)
             let spec=spec[1:]
-        elseif spec[0] is 'p'
+        elseif spec[0] is# 'p'
             call call(s:r.path.addpathp, [a:idx], self)
             let spec=spec[1:]
         endif
-        if spec is 'x'
+        if spec is# 'x'
             call self.nextthrow('!executable('.curargstr.')',
                         \       'nexecable', a:idx, curargstr)
         endif
 function s:r.path.complete(desc, idx, type)
     let spec=a:desc[1]
     let filter=''
-    if spec[0] is 'd'
+    if spec[0] is# 'd'
         let spec=spec[1:]
-        if spec[0] is 'w'
+        if spec[0] is# 'w'
             let filter='filewritable(file)==2'
             let spec=spec[1:]
-        elseif spec[0] is 'W'
+        elseif spec[0] is# 'W'
             let filter='(filewritable(file)==2 || '.
                         \'(!s:_r.os.path.exists(file) && '.
                         \ 'filewritable(dirnamestr)==2))'
             let spec=spec[1:]
-        elseif spec[0] is 'p'
+        elseif spec[0] is# 'p'
             let filter='(s:_r.os.path.exists(file)? '.
                         \   's:_r.os.path.isdir(file): '.
                         \   's:r.path.inwpath(file))'
         endif
     else
         let fileonly=0
-        if spec[0] is 'f'
+        if spec[0] is# 'f'
             let spec=spec[1:]
             let fileonly=1
         endif
         if fileonly
-            if spec[0] is 'r'
+            if spec[0] is# 'r'
                 let filter='filereadable(file)'
                 let spec=spec[1:]
-            elseif spec[-1:] isnot 'x'
+            elseif spec[-1:] isnot# 'x'
                 " There is no way to exclude directories
             endif
         endif
-        if spec[0] is 'w'
+        if spec[0] is# 'w'
             let filter='filewritable(file)'
             let spec=spec[1:]
-        elseif spec[0] is 'W'
+        elseif spec[0] is# 'W'
             if !empty(filter)
                 let filter.='? 1: '
             endif
             let filter.='(!s:_r.os.path.exists(file) && '.
                         \ 'filewritable(s:_r.os.path.dirname(file))==2)'
             let spec=spec[1:]
-        elseif spec[0] is 'p'
+        elseif spec[0] is# 'p'
             if !empty(filter)
                 let filter.='? 1: '
             endif
             let filter.='s:_r.os.path.inwpath(file)'
             let spec=spec[1:]
         endif
-        if spec is 'x'
+        if spec is# 'x'
             if !empty(filter)
                 let filter='('.filter.') && '
             endif
         if self.len
             let readchar=s:typechars[c][1]
             let c=self.readc()
-            if c isnot readchar
+            if c isnot# readchar
                 call self.ungetc(c)
             endif
         endif
 function s:r.isfunc.check(desc, idx, type)
     let curargstr=self.argstr()
     let frefpref='string('.curargstr.')[10:11]'
+    let frefpref2='string('.curargstr.')[10:14]'
     if a:desc[1]
         call self.addtypecond([2], a:idx)
         call self.nextthrow('!exists('.string('*'.curargstr).') ||'.
-                    \                       frefpref.' is "s:"',
+                    \                       frefpref .' is# "s:" ||'.
+                    \                       frefpref2.' ==? "<SID>"',
                     \       'nfunc', a:idx,
                     \                'string('.curargstr.')[10:-3]')
     else
         call self.nextthrow('!((type('.curargstr.')==2 && '.
                     \         'exists('.string('*'.curargstr).')&&'.
-                    \          frefpref.' isnot "s:") '.
+                    \          frefpref .' isnot# "s:" && '.
+                    \          frefpref2.'    !=? "<SID>") '.
                     \        '|| (type('.curargstr.')=='.type('').
                     \            '&& '.curargstr.'=~#'.
                     \             '''\v^%([sla]@!\w:%(\w|\.)+|'.
 function s:r.is.check(desc, idx, type)
     let var=self.getvar(a:desc[1])
     let curargstr=self.argstr()
-    return self.nextthrow(curargstr.' isnot '.var,
+    return self.nextthrow(curargstr.' isnot# '.var,
                 \         'isnot', a:idx, var, 'string('.curargstr.')')
 endfunction
 "▶1 `value'
 let s:r.smart={'args': []}
 let s:smartfilters=[
             \'v:val==?str',
-            \'v:val[:(lstr)] is str',
+            \'v:val[:(lstr)] is# str',
             \'v:val[:(lstr)]==?str',
             \'stridx(v:val, str)!=-1',
             \'stridx(tolower(v:val), lowstr)!=-1',

plugin/frawor/fwc/parser.vim

             call add(parens, s:parens[stopsym])
         elseif has_key(s:revparens, stopsym)
             let close=''
-            while !empty(parens) && parens[-1] isnot stopsym
+            while !empty(parens) && parens[-1] isnot# stopsym
                 let close.=remove(parens, -1)
             endwhile
             let c.=close
             else
                 call remove(parens, -1)
             endif
-        elseif stopsym is '"'
+        elseif stopsym is# '"'
             let string=matchstr(self.s, '\v(\\.|[^\\"])*"', len(chunk))
             if empty(string)
                 call self.throw('unmatchp', '"')
             else
                 let chunk.=string
             endif
-        elseif stopsym is "'"
+        elseif stopsym is# "'"
             let string=matchstr(self.s, '\v(''''|[^''])*''', len(chunk))
             if empty(string)
                 call self.throw('unmatchp', "'")
     call self.addcon()
     if self.len
         let c=self.readc()
-        if c is '('
+        if c is# '('
             while self.len
                 let c=self.readc()
-                if c is ')'
+                if c is# ')'
                     break
-                elseif c isnot ','
+                elseif c isnot# ','
                     call self.ungetc(c)
                     call call(a:F, [], self)
                 endif
                 call call(a:F, [], self)
                 if self.len
                     let c=self.readc()
-                    if c isnot ','
+                    if c isnot# ','
                         call self.ungetc(c)
                         break
                     endif
     endif                                "▲2
     call self.addcon('intfunc', func)
     let fargs=s:_r.FWC_intfuncs[func].args
-    if type is 'matcher'
+    if type is# 'matcher'
         let fargs=fargs+['?one']
     endif
     for farg in fargs
-        if farg[0] is '?'
+        if farg[0] is# '?'
             let farg=farg[1:]
         elseif !self.len "▶2
             call self.throw('argmis', type.'.'.func)
         endif            "▲2
-        if farg[0] is '*'
+        if farg[0] is# '*'
             let farg=farg[1:]
-            call self.scanlist(((farg[:2] is 'get')?
+            call self.scanlist(((farg[:2] is# 'get')?
                         \           (s:_r.FWC_intfuncs[func][farg]):
                         \           (self['get'.farg])))
         else
-            call call(((farg[:2] is 'get')?
+            call call(((farg[:2] is# 'get')?
                         \(s:_r.FWC_intfuncs[func][farg]):
                         \(self['get'.farg])), [], self)
         endif
         call self.add(0)
     else
         let c=self.readc()
-        if c is '1'
+        if c is# '1'
             call self.add(1)
         else
             call self.add(0)
-            if c isnot '0'
+            if c isnot# '0'
                 call self.ungetc(c)
             endif
         endif
 function s:parser.getstring()
     if self.len
         let c=self.readc()
-        if c is '$'
+        if c is# '$'
             call self.getvar()
-        elseif c is '"'
+        elseif c is# '"'
             call self.add(self.readstr())
-        elseif c is "'"
+        elseif c is# "'"
             call self.add(self.readsstr())
         elseif c=~#'^\w'
             call self.add(c)
         let c=self.readc()
         if requiresdot
             let requiresdot=0
-            if c isnot '.'
+            if c isnot# '.'
                 call self.ungetc(c)
                 break
             endif
             call self.add(+c)
         elseif c=~#'^\w'
             call self.add(c)
-        elseif c is '-'
+        elseif c is# '-'
             call self.add(-self.getc())
-        elseif c is '"'
+        elseif c is# '"'
             call self.add(self.readstr())
-        elseif c is "'"
+        elseif c is# "'"
             call self.add(self.readsstr())
-        elseif c is ':'
+        elseif c is# ':'
             call self.addcon()
             " Start and end subscripts
             for i in range(0, 1)
                 let v=self.readc()
-                if v is '-'
+                if v is# '-'
                     call self.add(+v.(self.readc()))
                 elseif v=~#'^\d'
                     call self.add(+v)
-                elseif v is '$'
+                elseif v is# '$'
                     call self.getvar()
                 else
                     call self.ungetc(v).getvar()
                 endif
             endfor
             call self.conclose()
-        elseif c is '$'
+        elseif c is# '$'
             call self.addcon().getvar().conclose()
         else
             call self.addcon().ungetc(c).getvar().conclose()
     call self.addcon('ddescr')
     if self.len
         let c=self.readc()
-        if c isnot '{'
+        if c isnot# '{'
             call self.ungetc(c)
         endif
         let prevlen=-1
         while self.len && self.len!=prevlen
             let prevlen=self.len
             let c=self.readc()
-            if c is '}'
+            if c is# '}'
                 break
-            elseif c is '/'
+            elseif c is# '/'
                 call self.addcon('regex', self.readreg('/')).scan().conclose()
-            elseif c is '*'
+            elseif c is# '*'
                 call self.addcon('func').getfunc().scan().conclose()
-            elseif c is '='
+            elseif c is# '='
                 call self.addcon('expr').getexpr().scan().conclose()
-            elseif c is '?'
+            elseif c is# '?'
                 call self.addcon('check').scan().scan().conclose()
-            elseif c is '-'
+            elseif c is# '-'
                 call self.addcon('any').scan().conclose()
-            elseif c is '"'
+            elseif c is# '"'
                 call self.addcon('eq', self.readstr()).scan().conclose()
-            elseif c is "'"
+            elseif c is# "'"
                 call self.addcon('eq', self.readsstr()).scan().conclose()
             elseif c=~#'^\w'
                 call self.addcon('eq', c).scan().conclose()
 function s:parser.getreg()
     call self.addcon('regex')
     let c=self.readc()
-    if c is '$'
+    if c is# '$'
         call self.getvar()
     else
         call self.add(self.readreg(get(s:pairs, c, c)))
     let f=self.readflt()
     if f is 0
         let c=self.readc()
-        if c is '$'
+        if c is# '$'
             return self.getvar()
         else
             call self.ungetc(c)
         endif
-    elseif f[-3:] is 'inf'
+    elseif f[-3:] is# 'inf'
         let sign=f[0]
-        if f[0] is 'i'
+        if f[0] is# 'i'
             let sign='+'
         endif
         return self.addcon('inf', sign).conclose()
-    elseif f is 'nan'
+    elseif f is# 'nan'
         return self.addcon('nan').conclose()
     endif
     let r=eval(f)
-    if type(r) is type(0)
+    if type(r)==type(0)
         return self.addcon('number', r).conclose()
     else
         return self.addcon('float', r).conclose()
 function s:parser.getchvar()
     if self.len
         let c=self.readc()
-        if c is '<' || c is '>'
+        if c is# '<' || c is# '>'
             call self.addcon('argument', 0)
             call self.ungetc(c)
             while self.len
                 let c=self.readc()
-                if c is '>'
+                if c is# '>'
                     let self.l[-1]+=1
-                elseif c is '<'
+                elseif c is# '<'
                     let self.l[-1]-=1
                 else
                     break
             call self.ungetc(c).addcon('cur', 0)
             while self.len
                 let c=self.readc()
-                if c is '^'
+                if c is# '^'
                     let self.l[-1]+=1
                 else
                     break
                 endif
             endwhile
         endif
-        if c is '.'
+        if c is# '.'
             call self.getsubscr()
         elseif self.len
             call self.ungetc(c)
     call self.addcon('list')
     while self.len
         let c=self.readc()
-        if c is ']'
+        if c is# ']'
             break
-        elseif c is '$'
+        elseif c is# '$'
             call self.getvar()
-        elseif c is '"'
+        elseif c is# '"'
             call self.add(self.readstr())
-        elseif c is "'"
+        elseif c is# "'"
             call self.add(self.readsstr())
         elseif c=~#'^\w'
             call self.add(c)
     let c=self.readc()
     if c=~#'^\w'
         call self.addcon('plugvar').ungetc(c).getsubscr().conclose()
-    elseif c is '@'
+    elseif c is# '@'
         return self.getchvar()
-    elseif c is '='
+    elseif c is# '='
         return self.getexpr()
-    elseif c is '['
+    elseif c is# '['
         call self.getlist()
-    elseif c is '*'
+    elseif c is# '*'
         call self.getfunc()
-    elseif c is '$'
+    elseif c is# '$'
         call self.addcon('evaluate').getvar().conclose()
-    elseif c is '"'
+    elseif c is# '"'
         call self.addcon('string', self.readstr()).conclose()
-    elseif c is "'"
+    elseif c is# "'"
         call self.addcon('string', self.readsstr()).conclose()
-    elseif c is '('
+    elseif c is# '('
         call self.getvar()
-        if self.readc() isnot ')'
+        if self.readc() isnot# ')'
             call self.throw('unmatchp', '(')
         endif
     else
     call self.addcon('func').getvar()
     if self.len
         let c=self.readc()
-        if c is '('
+        if c is# '('
             while self.len
                 let c=self.readc()
-                if c is ')'
+                if c is# ')'
                     break
-                elseif c is '.'
+                elseif c is# '.'
                     call self.addcon('this').conclose()
-                elseif c isnot ','
+                elseif c isnot# ','
                     call self.ungetc(c).getvar()
                 endif
             endwhile
 function s:parser.getomtchr()
     if self.len
         let c=self.readc()
-        if c is '~'
+        if c is# '~'
             return self.getmatcher()
         endif
         return self.ungetc(c)
 function s:parser.scanfie(cname)
     call self.addcon(a:cname)
     let c=self.readc()
-    if c is '*'
+    if c is# '*'
         call self.getfunc()
-    elseif c is '='
+    elseif c is# '='
         call self.getexpr()
     else
         call self.ungetc(c).intfunc()
 "                   | {var}
 function s:parser.scanmsg()
     let c=self.readc()
-    call self.addcon('msg', ((c is '#')?(0):((c is '^')?(1):(c))))
+    call self.addcon('msg', ((c is# '#')?(0):((c is# '^')?(1):(c))))
     if self.len
         let c=self.readc()
-        if c is '('
+        if c is# '('
             while self.len
                 let c=self.readc()
-                if c is ')'
+                if c is# ')'
                     break
-                elseif c is '.'
+                elseif c is# '.'
                     call self.addcon('curval').conclose()
-                elseif c is '%'
+                elseif c is# '%'
                     call self.addcon('curarg').conclose()
-                elseif c is '#'
+                elseif c is# '#'
                     call self.addcon('curidx').conclose()
-                elseif c isnot ','
+                elseif c isnot# ','
                     call self.ungetc(c).getvar()
                 endif
             endwhile
     "▶2 optional, prefixes, actions, next
     let c=self.readc()
     let type=get(self.l, 0, '')
-    if !self.o.only && (type is 'top' || type is 'optional'
-                \    || type is 'action')
+    if !self.o.only && (type is# 'top' || type is# 'optional'
+                \    || type is# 'action')
         if has_key(s:_r.FWC_topconstructs._chars, c)
             return call(s:_r.FWC_topconstructs[s:_r.FWC_topconstructs._chars[c]]
                         \.scan, [], self)
     "▲2
     call self.addcon('arg')
     "▶2 Default value
-    if type is 'optional' && c is ':'
+    if type is# 'optional' && c is# ':'
         call self.addcon('defval').getvar().conclose()
         let c=self.readc()
     endif
     "▶2 Define variables used to determine how to handle second word
-    let accepttext=(type is 'next' || self.o.only)
+    let accepttext=(type is# 'next' || self.o.only)
     let hasparen=0
     let hastext=0
-    if c is '('
+    if c is# '('
         let hasparen=1
         let accepttext=1
     else
     "▲2
     while self.len
         let c=self.readc()
-        if c is '|'
+        if c is# '|'
             call self.scanfie('pipe')
-        elseif c is '?'
+        elseif c is# '?'
             call self.scanfie('check')
-        elseif c is '#'
+        elseif c is# '#'
             call self.scanmsg()
         elseif (!hastext || accepttext) && c=~#'^\w'
             let hastext=1
             if !accepttext
                 break
             endif
-        elseif hasparen && c is ')'
+        elseif hasparen && c is# ')'
             break
         else
             call self.ungetc(c)
     while self.len
         let c=self.readc()
         if hasdash
-            if c is '('
+            if c is# '('
                 let hasparen=1
             elseif has_key(self.o, c)
                 let self.o[c]=1
                 if !hasparen
                     let hasdash=0
                 endif
-            elseif hasparen && c is ')'
+            elseif hasparen && c is# ')'
                 let hasparen=0
                 let hasdash=0
             else
                 call self.throw('uoption', c)
             endif
-        elseif c is '-'
+        elseif c is# '-'
             let hasdash=1
         else
             call self.ungetc(c)

plugin/frawor/fwc/topconstructs.vim

     while self.len && self.len!=prevlen
         let prevlen=self.len
         let c=self.readc()
-        if c is ']'
+        if c is# ']'
             break
         else
             call self.ungetc(c).scan()
 "   {lvars} :: nextsub, addedsavemsgs
 function s:r.optional.compile(adescr, idx, caidxstr, largsstr, purgemax, type,
             \                 nextsub, addedsavemsgs)
-    if a:type is 'complete'
+    if a:type is# 'complete'
         let hasnext=s:F.hasnext(a:adescr, 'optional')
         if !hasnext && len(a:adescr.optional)==1
             call self.compadescr(a:adescr.optional[0], a:idx.'.0(optional)',
                         \        a:type, 0)
             let oldsub=self.getlastsub()
-            if oldsub isnot a:caidxstr
+            if oldsub isnot# a:caidxstr
                 call self.let(a:caidxstr, oldsub)
             endif
             return [[a:caidxstr], a:addedsavemsgs]
         call self.let(failstr, 0)
     endif
     let newsub=self.getlastsub()
-    if newsub isnot a:caidxstr
+    if newsub isnot# a:caidxstr
         call self.let(a:caidxstr, newsub)
     endif
     call self.catch(s:cfreg)
     if lopt==1 && has_key(a:adescr.optional[0], 'arg')
         let defaults=reverse(map(filter(copy(a:adescr.optional[0].arg),
                     \                   'exists("v:val[0][0]") && '.
-                    \                   'v:val[0][0] is "defval"'),
+                    \                   'v:val[0][0] is# "defval"'),
                     \            'v:val[0][1]'))
         let self.defvals+=defaults
         if !empty(defaults) && nodefs
                             \.addrestmsgs(1)
                             \.let(failstr, 0)
             let newsub=self.getlastsub()
-            if newsub isnot a:caidxstr
+            if newsub isnot# a:caidxstr
                 call self.let(a:caidxstr, newsub)
             endif
             call self.catch(s:cfreg)
             endif
             if c=~#'^\w'
                 let pref=c
-            elseif c is '"'
+            elseif c is# '"'
                 let c=self.readstr()
                 let pref=c
-            elseif c is "'"
+            elseif c is# "'"
                 let c=self.readsstr()
                 let pref=c
-            elseif c is '+'
+            elseif c is# '+'
                 let prefopts.argnum=+self.readc()
-            elseif c is '?'
+            elseif c is# '?'
                 let prefopts.opt=1
-            elseif c is '!'
+            elseif c is# '!'
                 let prefopts.alt=1
                 let prefopts.argnum=0
-            elseif c is '*'
+            elseif c is# '*'
                 let prefopts.list=1
-            elseif c is '}'
+            elseif c is# '}'
                 break
             else
                 call self.ungetc(c)
             endif
         else
             call self.addcon('prefix', pref, prefopts)
-            if c is ':'
+            if c is# ':'
                 let prefopts.opt=1
                 call self.getvar()
                 let c=self.readc()
             endif
-            if c is '-'
+            if c is# '-'
                 let prefopts.argnum=0
             else
                 call self.ungetc(c)
     let astr=self.getlvarid('arg')
     let idx=a:idx.'(prefixes)'
     let defaults=filter(copy(a:adescr.prefixes),
-                \       'exists("v:val[2][0]") && v:val[2][0] isnot "arg"')
+                \       'exists("v:val[2][0]") && v:val[2][0] isnot# "arg"')
     let lists=filter(copy(a:adescr.prefixes), 'v:val[1].list')
     let haslist=!empty(lists)
     let lastliststr=self.getlvarid('lastlist')
     if haslist
         call self.let(lastliststr, 0)
     endif
-    if a:type is 'check' || a:type is 'pipe'
+    if a:type is# 'check' || a:type is# 'pipe'
         "▶3 Add messages saving if required
         if hasnext
             if !addedsavemsgs
         call self.while(a:caidxstr.'<'.a:largsstr)
     endif
     "▶3 Get `astr' variable
-    if a:type is 'check' || a:type is 'pipe'
+    if a:type is# 'check' || a:type is# 'pipe'
         if !self.o.onlystrings
             if haslist
                 call self.if('type('.self.argstr().')=='.type(''))
     call self.let(astr, self.getmatcher(get(a:adescr, 'prefixesmatcher',
                 \                           s:prefdefmatcher), plstr,
                 \                       self.argstr(), 0))
-    if a:type is 'check' || a:type is 'pipe'
+    if a:type is# 'check' || a:type is# 'pipe'
         let removestr='remove('.base.', '.a:caidxstr.')'
         if hasnext
             let argorigstr=self.getd('argorig')
         endif
         "▶3 Remove default value specification if any
         let hasdefault=0
-        if !empty(args) && args[0][0] isnot 'arg'
+        if !empty(args) && args[0][0] isnot# 'arg'
             let hasdefault=1
             call remove(args, 0)
         endif
         "▲3
         let prefstr=prefdictstr.self.getsubs([prefix])
         let prefixstr=self.string(prefix)
-        if a:type is 'complete' && !prefopts.argnum
+        if a:type is# 'complete' && !prefopts.argnum
             continue
         endif
         "▶3 Construct prefix condition
-        let cond=astr.' is '.prefixstr
+        let cond=astr.' is# '.prefixstr
         if prefopts.list
             let cond.=' || ('.astr.' is 0 && '.
-                        \   lastliststr.' is '.prefixstr.')'
+                        \   lastliststr.' is# '.prefixstr.')'
         endif
         call self.addif(cond)
         "▶3 Process prefix arguments
-        if a:type is 'check' || a:type is 'pipe'
+        if a:type is# 'check' || a:type is# 'pipe'
             for i in range(1, prefopts.argnum)
                 call self.compilearg(args[i-1], idx.self.string(prefix), a:type)
                             \.incsub()
             call self.up().up()
         endif
         "▶3 Move prefix arguments to prefix dictionary
-        if a:type is 'complete'
+        if a:type is# 'complete'
             call self.up()
         elseif prefopts.list
             let removestr='remove('.base.', '.a:caidxstr.', '.
         let self.subs[-1]=[a:caidxstr]
         call self.up()
         "▶3 Process `no{prefix}'
-        if a:type is 'check' || a:type is 'pipe'
+        if a:type is# 'check' || a:type is# 'pipe'
             if prefopts.alt
-                call self.addif(astr.' is '.self.string('no'.prefix))
+                call self.addif(astr.' is# '.self.string('no'.prefix))
                             \.let(prefstr, 0)
                             \.up()
             endif
         endif
         "▲3
     endfor
-    if a:type is 'complete'
+    if a:type is# 'complete'
         call self.addif(astr.' is 0')
                     \.break()
                 \.up()
     endif
     call self.up()
-    if a:type is 'check' || a:type is 'pipe'
+    if a:type is# 'check' || a:type is# 'pipe'
         if hasnext
             call self.unlet(argorigstr).up().up().addrestmsgs(1).popms()
                 \.catch(s:cfreg)
             \             nextsub, addedsavemsgs)
     let addedsavemsgs=a:addedsavemsgs
     let hasnext=s:F.hasnext(a:adescr, 'next')
-    if a:type is 'complete'
+    if a:type is# 'complete'
         let condition=a:largsstr.'>='.self.getlastsub()
         if self.onlyfirst
             let condition=a:largsstr.'-1 == '.self.getlastsub()
         let c=self.readc()
         if !hasaction
             let hasaction=1
-            if c is '>'
+            if c is# '>'
                 let hasaction=0
                 break
-            elseif c is '"'
+            elseif c is# '"'
                 call self.addcon('action', self.readstr())
-            elseif c is "'"
+            elseif c is# "'"
                 call self.addcon('action', self.readsstr())
-            elseif c is '-'
+            elseif c is# '-'
                 call self.addcon('action', 0)
             elseif c=~#'^\w'
                 call self.addcon('action', c)
             endif
         else
             let hasaction=0
-            if c is '('
+            if c is# '('
                 while self.len
                     let c=self.readc()
-                    if c is ')'
+                    if c is# ')'
                         break
                     endif
                     call self.ungetc(c).scan()
                 endwhile
-            elseif c isnot '>' && c isnot '-'
+            elseif c isnot# '>' && c isnot# '-'
                 call self.ungetc(c).scan()
             endif
             call self.conclose()
 "▶2 optimizenullact :: &self(caidxstr)
 " XXX low-level hacks here
 function s:r.actions.optimizenullact(caidxstr)
-    if len(self.l)==2 && self.l[1][0] is 'if'
+    if len(self.l)==2 && self.l[1][0] is# 'if'
                 \&& (len(self.l[1])==3 ||
-                \    (len(self.l[1])==4 && self.l[-1] is 'endif'))
+                \    (len(self.l[1])==4 && self.l[-1] is# 'endif'))
                 \&& len(self.stack[-2])==3
-                \&& self.stack[-2][0] is 'if'
-                \&& self.l[1][1] is self.stack[-2][1]
+                \&& self.stack[-2][0] is# 'if'
+                \&& self.l[1][1] is# self.stack[-2][1]
         call extend(self.l, self.l[1][2])
         call remove(self.l, 1)
-    elseif len(self.l)==3 && self.l[1][0] is 'let'
-                \&& self.l[1][2] is a:caidxstr
-                \&& self.l[2][0] is 'if'
+    elseif len(self.l)==3 && self.l[1][0] is# 'let'
+                \&& self.l[1][2] is# a:caidxstr
+                \&& self.l[2][0] is# 'if'
                 \&& (len(self.l[2])==3 ||
-                \    (len(self.l[2])==4 && self.l[-1] is 'endif'))
+                \    (len(self.l[2])==4 && self.l[-1] is# 'endif'))
                 \&& len(self.stack[-2])==3
-                \&& self.stack[-2][0] is 'if'
+                \&& self.stack[-2][0] is# 'if'
                 \&& self.l[2][1][:(-1-len(self.l[1][1]))] is
                 \   self.stack[-2][1][:(-1-len(a:caidxstr))]
         call extend(self.l, self.l[2][2])
     let actions=filter(copy(a:adescr.actions), 'v:val[0] isnot 0')
     let noact=get(filter(copy(a:adescr.actions), 'v:val[0] is 0'), 0, 0)
     let fsastr=self.getfunstatvar('actions', map(copy(actions), 'v:val[0]'))
-    if noact isnot 0 && a:type isnot 'complete'
+    if noact isnot 0 && a:type isnot# 'complete'
         call self.try().pushms('throw')
     endif
     let idx=a:idx.'(actions)'
-    if !self.o.onlystrings && a:type isnot 'complete'
+    if !self.o.onlystrings && a:type isnot# 'complete'
         call self.addtypecond([type('')], idx)
     endif
     let curargstr=self.argstr()
-    if a:type is 'complete'
+    if a:type is# 'complete'
         call self.addif(a:largsstr.'-1 == '.self.getlastsub())
                         \.addmatches(fsastr, type([]))
         let savedsub=copy(self.subs[-1])
     call self.let(actionstr, self.getmatcher(get(a:adescr, 'actionsmatcher',
                 \                                s:actdefmatcher),
                 \                            fsastr, curargstr, 0))
-    if a:type isnot 'complete'
+    if a:type isnot# 'complete'
         call self.nextthrow(actionstr.' is 0', 'anf', idx, curargstr)
     endif
-    if a:type is 'pipe'
+    if a:type is# 'pipe'
         call self.let(curargstr, actionstr)
     endif
     unlet curargstr
     call self.incsub()
     let astartsub=copy(self.subs[-1])
     for [actstr; actargs] in actions
-        call self.addif(actionstr.' is '.self.string(actstr))
+        call self.addif(actionstr.' is# '.self.string(actstr))
         if !empty(actargs)
             call self.compadescr(actargs[0], idx.'.'.self.string(actstr),
                         \        a:type, 0)
         let self.subs[-1]=copy(astartsub)
     endfor
     if noact isnot 0
-        if a:type is 'complete'
+        if a:type is# 'complete'
             call self.else()
         else
             call self.popms().catch(s:cfreg)
         call self.up().up()
     endif
     let self.subs[-1]=[a:caidxstr]
-    if a:type is 'complete'
+    if a:type is# 'complete'
         call self.up().up()
     endif
     return [[a:caidxstr], a:addedsavemsgs]
 "▶1 _order
 let s:r._order=['optional', 'prefixes', 'next', 'actions']
 let s:r._chars={}
-call map(filter(copy(s:r), 'v:key[0] isnot "_" && has_key(v:val, "char")'),
+call map(filter(copy(s:r), 'v:key[0] isnot# "_" && has_key(v:val, "char")'),
             \'extend(s:r._chars, {v:val.char : v:key})')
 "▶1 Register resource
 call s:_f.postresource('FWC_topconstructs', s:r, 1)

plugin/frawor/mappings.vim

 endif
 "▶1 hsescape      :: String, sid[, a:1::Bool] → String
 function s:F.hsescape(str, sid, ...)
-    if a:0 && a:1 is 'menu'
+    if a:0 && a:1 is# 'menu'
         return a:str
     endif
     return substitute(substitute(substitute(substitute(substitute(a:str,
 endfunction
 "▶1 modrewrite    :: mode, type → [mode]
 function s:F.modrewrite(mode, type)
-    if a:type is 'abbr'
+    if a:type is# 'abbr'
         return split(substitute(a:mode, ' ', 'ci', ''), '.\@=')
     else
         return split(substitute(substitute(substitute(a:mode,
                     \ ((a:mapdescr.buffer)?("<buffer>"):(""))
                     \ ((a:mapdescr.expr)?("<expr>"):(""))
                     \ lhs rhs
-        if a:mapdescr.type is 'menu' && has_key(a:mapdescr, 'tip')
+        if a:mapdescr.type is# 'menu' && has_key(a:mapdescr, 'tip')
             " Deletes text that appears on the right as it is not accepted by 
             " tmenu
             let lhs=substitute(lhs, '\v%(\\@<!\\%(\\\\)*)@<!\c\<Tab\>.*$','','')
         endif
         call filter(map(lhss, 'leader.v:val'), '!empty(v:val)')
         "▶2 Check for invalid lhs suffixes in an abbreviations
-        if (map.type) is 'abbr'
+        if (map.type) is# 'abbr'
             let invlhss=filter(copy(lhss), 'v:val!~#s:ablhsreg')
             if !empty(invlhss)
                 call s:_f.throw('invabbrlhs', (map.id), a:mgroup.id,
                     \    'sid': a:plugdict.sid,
                     \   'maps': {},
                     \ 'leader': '',
-                    \ 'buffer': (a:plugdict.type is 'ftplugin'),
-                    \ 'nouser': (mgid[0] is '_'),
+                    \ 'buffer': (a:plugdict.type is# 'ftplugin'),
+                    \ 'nouser': (mgid[0] is# '_'),
                     \'dontmap': 0,}
         "▶3 Add options: presence -> mgroup (nouser, dontmap, buffer)
         if a:0
         "▲4
     endif
     "▶3 filetype
-    if !mgroup.dontmap && a:plugdict.type is 'ftplugin'
+    if !mgroup.dontmap && a:plugdict.type is# 'ftplugin'
         let mgroup.filetype=matchstr(a:plugdict.id[9:], '^[^/]*')
         let mgroup.dontmap=1
     endif
             call s:_f.throw('mtypenstr', mapname, mgid, a:plugdict.id)
         elseif !has_key(s:maptypes, map.type)
             call s:_f.throw('invmtype', mapname, mgid, a:plugdict.id, map.type)
-        elseif (map.type is 'abbr') && type(map.lhs)==type("") &&
+        elseif (map.type is# 'abbr') && type(map.lhs)==type("") &&
                     \type(mgroup.leader)==type("") &&
                     \((mgroup.leader).(map.lhs)!~#s:ablhsreg)
             call s:_f.throw('invabbrlhs', mapname, mgid, a:plugdict.id,
             call s:_f.throw('invmode', mapname, mgid, a:plugdict.id, map.mode)
         endif
         "▶3 Reset keys that are irrelevant to menu, add `tip'
-        if (map.type) is 'menu'
+        if (map.type) is# 'menu'
             let map.expr=0
             let map.buffer=0
             if has_key(mapdescr, 'tip')

plugin/frawor/options.vim

         if has_key(option, 'merger')
             if type(option.merger)==2 && exists('*option.merger')
                 let oshadow.merger=option.merger
-            elseif option.merger is 'extend'
+            elseif option.merger is# 'extend'
                 let oshadow.merger=s:F.extendopts
             else
                 call s:_f.throw('umerger', a:oid, a:plugdict.id)

plugin/frawor/os.vim

     let s:os.fullname='unknown'
 endfor
 "▶2 os.name
-if s:os.fullname[-3:] is 'nix' || s:os.fullname[:2] is 'mac' ||
-            \s:os.fullname is 'qnx' || s:os.fullname is 'vms'
+if s:os.fullname[-3:] is# 'nix' || s:os.fullname[:2] is# 'mac' ||
+            \s:os.fullname is# 'qnx' || s:os.fullname is# 'vms'
     let s:os.name='posix'
-elseif s:os.fullname[:2] is 'win'
+elseif s:os.fullname[:2] is# 'win'
     let s:os.name='nt'
-elseif s:os.fullname is 'os2'
+elseif s:os.fullname is# 'os2'
     let s:os.name='os2'
 else
     let s:os.name='other'
 "▲2
 let s:os.sep=fnamemodify(expand('<sfile>:h'), ':p')[-1:]
 "▶2 os.linesep
-if s:os.name is 'nt'
+if s:os.name is# 'nt'
     let s:os.linesep="\r\n"
-elseif s:os.fullname[:2] is 'mac'
+elseif s:os.fullname[:2] is# 'mac'
     let s:os.linesep="\r"
 else
     let s:os.linesep="\n"
 endif
 "▶2 os.pathsep
-if s:os.name is 'nt' || s:os.name is 'os2'
+if s:os.name is# 'nt' || s:os.name is# 'os2'
     let s:os.pathsep=';'
 else
     let s:os.pathsep=':'
 endfunction
 "▶3 os.path.join      :: path[, path[, ...]] | [path] → path
 "▶4 s:eps
-if s:os.name is 'nt'
+if s:os.name is# 'nt'
     let s:eps='[/\\]'
 else
     let s:eps='\V'.escape(s:os.sep, '\')
 function s:os.listdir(path, ...)
     let path=s:os.path.abspath(a:path)
     let filelist=s:F.globdir(path)
-    if s:os.name is 'posix'
+    if s:os.name is# 'posix'
         let filelist+=s:F.globdir(path, '.*')
     else
         call filter(filelist, '!empty(v:val)')
     let i=0
     let addfragment=''
     for file in filelist
-        if i==0 && file[:0] isnot '/'
+        if i==0 && file[:0] isnot# '/'
             let r[-1].="\n".file
             continue
         elseif i<nlnum
             let addfragment=''
         endif
         let tail=fnamemodify(file, ':t')
-        if tail is '.' || tail is '..'
+        if tail is# '.' || tail is# '..'
             continue
         endif
         call add(r, ((a:0)?(file):(tail)))
         \}
 function s:os.run(command, ...)
     let hasnewlines=!empty(filter(copy(a:command), 'stridx(v:val, "\n")>0'))
-    if s:os.name is 'nt'
+    if s:os.name is# 'nt'
         let cmd=escape(a:command[0], '\ %')
         if len(a:command)>1
             let cmd.=' '.join(map(a:command[1:],
 endif
 "▶2 os.unlink         :: path + FS → Bool + FS
 function s:os.unlink(path)
-    return delete(a:path) is 0
+    return delete(a:path) is# 0
 endfunction
 let s:os.remove=s:os.unlink
 "▶2 os.rmdir          :: path → Bool + FS
     if !(s:os.path.isdir(path) && empty(s:os.listdir(path)))
         return 0
     endif
-    if s:os.name is "posix"
+    if s:os.name is# "posix"
         if executable("rmdir")
             return !s:os.run(["rmdir", path])
         elseif executable("rm") && empty(s:os.listdir(path))
             return !s:os.run(["rm", "-r", path])
         endif
-    elseif s:os.name is "nt"
+    elseif s:os.name is# "nt"
         " For some reason |executable()| function does not work
         return ((!s:os.run(["rmdir", path])) || (!s:os.run(["deltree", path])))
     endif
     let path=s:os.path.normpath(a:path)
     let prevpath=""
     let i=0
-    while path isnot '.' && path isnot prevpath && s:os.rmdir(path)
+    while path isnot# '.' && path isnot# prevpath && s:os.rmdir(path)
         let prevpath=path
         let path=s:os.path.dirname(path)
         let i+=1

test/reload-frawor.ok

 load: plugin/writefile-feature
 unloadpre: autoload/frawor
 unloadpre: plugin/frawor/commands
-unloadpre: plugin/frawor/functions
 unloadpre: plugin/frawor/lua
 unloadpre: plugin/frawor/mappings
 unloadpre: plugin/frawor/perl
 unloadpre: plugin/frawor/ruby
 unloadpre: plugin/frawor/tcl
 unloadpre: plugin/ignoredeps-feature
-unloadpre: plugin/frawor/autocommands
+unloadpre: plugin/frawor/functions
 unloadpre: plugin/frawor/options
 unloadpre: plugin/writefile-feature
+unloadpre: plugin/frawor/autocommands
 unloadpre: plugin/frawor/decorators/altervars
 unloadpre: plugin/frawor/checks
 unloadpre: plugin/frawor/fwc/compiler
 unloadpre: plugin/frawor
 unload: autoload/frawor
 unload: plugin/frawor/commands
-unload: plugin/frawor/functions
 unload: plugin/frawor/lua
 unload: plugin/frawor/mappings
 unload: plugin/frawor/perl
 load: plugin/frawor/fwc/intfuncs
 register: plugin/frawor/fwc/topconstructs
 load: plugin/frawor/fwc/topconstructs
+register: plugin/frawor/functions
+load: plugin/frawor/functions
 register: plugin/frawor/fwc/compiler
 load: plugin/frawor/fwc/compiler
 register: plugin/writefile-feature
 load: plugin/frawor/mappings
 register: plugin/frawor/lua
 load: plugin/frawor/lua
-register: plugin/frawor/functions
-load: plugin/frawor/functions
 register: plugin/frawor/commands
 load: plugin/frawor/commands

test/rtp/plugin/fwccheck.vim

 for line in readfile('fwctests.dat')
     if empty(line)
         continue
-    elseif line[0] is '#'
+    elseif line[0] is# '#'
         if char2nr(line[1:])==0x25b6
             let level=+line[4:]
             if level<=len(sections)
             let i=1
         endif
         continue
-    elseif line[0] is ':'
+    elseif line[0] is# ':'
         execute toexecute."\n".line[1:]
         let toexecute=""
         continue
-    elseif line[0] is '\'
+    elseif line[0] is# '\'
         let toexecute.="\n".line[1:]
         continue