Commits

ZyX_I  committed 5267a0e

@frawor: Minor optimizations

  • Participants
  • Parent commits 06d8a73

Comments (0)

Files changed (1)

File plugin/frawor.vim

     return map(a:dict, 'type(v:val)=='.type({}).' ? '.
                 \           's:F.recdictmap(v:val, a:expr, path+[v:key], '.
                 \                          'processed) : '.
-                \           'eval(a:expr)')
+                \           '('.a:expr.')')
 endfunction
 "▶1 createconsfunc  :: efid, fname, consargs, suf → function
 function s:F.createconsfunc(efid, fname, consargs, suf)
     "▶2 Adding keys that hold functions
     let addedsomething=0
     for key in filter(copy(s:featfunckeys), 'has_key(a:fopts, v:val)')
-        if key is# 'cons'
-            if type(a:fopts[key])==type({})
-                call s:F.recdictmap(deepcopy(a:fopts[key]),
-                            \'s:F.isfunc(v:val, '.
-                            \           '"cons.".join(path+[v:key], "."), '.
-                            \            string(feature.name).', '.
-                            \            string(feature.plid).')')
-            else
-                call s:F.isfunc(a:fopts[key], key, feature.name,
-                            \   feature.plid)
-            endif
+        if key is# 'cons' && type(a:fopts[key])==type({})
+            call s:F.recdictmap(deepcopy(a:fopts[key]),
+                        \'s:F.isfunc(v:val, '.
+                        \           '"cons.".join(path+[v:key], "."), '.
+                        \            string(feature.name).', '.
+                        \            string(feature.plid).')')
         else
             call s:F.isfunc(a:fopts[key], key, feature.name, feature.plid)
         endif