1. ZyX_I
  2. notmuch-frontend

Commits

ZyX_I  committed 0d64e88

Added “setlocal nomodeline” to all filetypes to avoid possible confusions
(like “Subject: Issue 64 in *vim:* Can't…” — “Can't” is taken as on option)
Added possibility to use vim.bindeval with export_dict function

  • Participants
  • Parent commits 7345fc6
  • Branches default

Comments (0)

Files changed (5)

File ftplugin/notmuch_folders.vim

View file
 function s:F.setoptions()
     setlocal nolist
     setlocal textwidth=0
+    setlocal nomodeline
 endfunction
 call s:F.setoptions()

File ftplugin/notmuch_message.vim

View file
 endfunction
 function s:F.setoptions()
     let &l:foldexpr='<SNR>'.s:_sid.'_FoldExpr()'
+    setlocal textwidth=0
+    setlocal nomodeline
     setlocal foldmethod=expr
-    setlocal textwidth=0
     let fline=search('^--* text\/', 'cwn')
     if fline
         while foldclosed(fline)!=-1

File ftplugin/notmuch_search.vim

View file
 function s:F.setoptions()
     setlocal nolist
     setlocal textwidth=0
+    setlocal nomodeline
 endfunction
 call s:F.setoptions()

File ftplugin/notmuch_thread.vim

View file
 endfunction
 function s:F.setoptions()
     let &l:foldexpr='<SNR>'.s:_sid.'_FoldExpr()'
+    setlocal nomodeline
+    setlocal textwidth=0
     setlocal foldmethod=expr
     silent! %foldopen!
 endfunction

File python/notmuch_frontend.py

View file
     if buf in bvars:
         del bvars[buf]
 
-def export_dict(d):
-    vim.eval('extend(py, '+dumps(d)+')')
+if hasattr(vim, 'bindeval'):
+    def export_dict(d):
+        tgt=vim.bindeval('py')
+        for k, v in d.items():
+            tgt[k]=v
+else:
+    def export_dict(d):
+        vim.eval('extend(py, '+dumps(d)+')')
 
 def export_value(v):
     export_dict({'r': v})