1. Tamas Kovacs
  2. slimv

Commits

Tamas Kovacs  committed 8c50d94

Do not load contribs by default when starting the swank server.
Rather explicitly require specific contribs when connecting to swank.
Reason: some contribs are incompatible with some other packages on some lisp implementations.

  • Participants
  • Parent commits f5f10a1
  • Branches default

Comments (0)

Files changed (3)

File doc/slimv.txt

View file
-*slimv.txt*                    Slimv                 Last Change: 29 Dec 2013
+*slimv.txt*                    Slimv                 Last Change: 03 Mar 2014
 
 Slimv                                                                  *slimv*
-                               Version 0.9.12
+                               Version 0.9.13
 
 The Superior Lisp Interaction Mode for Vim.
 This plugin is aimed to help Lisp development by interfacing between Vim and
 This makes a permanent SWANK server that listens continuously. Otherwise
 each time the SWANK connection is lost, the SWANK server needs to be
 restarted again.
-Some SWANK features (like Xref) require the load of the contributed modules,
-so it is recommended to pass
-    :load-contribs t
-for the swank-loader:init function call in the SWANK strartup procedure.
 Example startup script:
 
 (load (merge-pathnames "swank-loader.lisp" *load-truename*))
 
 (swank-loader:init :delete nil
                    :reload nil
-                   :load-contribs t)
+                   :load-contribs nil)
 
 (swank:create-server :port 4005
                      :coding-system "iso-latin-1-unix"
      It is also possible to save a log of the communication between Slimv and
      the swank server by setting g:swank_log=1 in the .vimrc.
 
-- Q: I get SLDB error messages related to some contributed modules of Slime, e.g.
-     "The loaded code expects an incompatible layout for class SB-PRETTY:PRETTY-STREAM."
-- A: Some contribs are known to be incompatible with some other Lisp
-     packages. Try to disable contribs in slime/start-swank.lisp by setting
-     :load-contribs to 'nil'.
-
 - Q: Why is SLIME functionality XYZ missing from Slimv?
 - A: Not all SLIME functions are implemented in the SWANK client, however
      the list of these functions keep growing.  Maybe future releases will

File ftplugin/slimv.vim

View file
 " slimv.vim:    The Superior Lisp Interaction Mode for VIM
 " Version:      0.9.13
-" Last Change:  18 Feb 2014
+" Last Change:  03 Mar 2014
 " Maintainer:   Tamas Kovacs <kovisoft at gmail dot com>
 " License:      This file is placed in the public domain.
 "               No warranty, express or implied.
         while s:swank_version == '' && localtime()-starttime < g:slimv_timeout
             call SlimvSwankResponse()
         endwhile
+
+        " Require some contribs
+        let contribs = 'swank-presentations swank-fancy-inspector swank-c-p-c swank-arglists'
+        if SlimvGetFiletype() == 'lisp'
+            let contribs = 'swank-asdf swank-package-fu ' . contribs
+        endif
+        if g:slimv_simple_compl == 0
+            let contribs = contribs . ' swank-fuzzy'
+        endif
+        execute "python swank_require('(" . contribs . ")')"
+        call SlimvSwankResponse()
         if s:swank_version >= '2011-12-04'
             python swank_require('swank-repl')
             call SlimvSwankResponse()
             call SlimvCommandGetResponse( ':create-repl', 'python swank_create_repl()', g:slimv_timeout )
         endif
         let s:swank_connected = 1
-        if g:slimv_simple_compl == 0
-            python swank_require('swank-fuzzy')
-            call SlimvSwankResponse()
-        endif
         redraw
         echon "\rConnected to SWANK server on port " . g:swank_port . "."
         if exists( "g:swank_block_size" ) && SlimvGetFiletype() == 'lisp'

File slime/start-swank.lisp

View file
 ;;; 6.2 section of the Slime user manual.
 ;;;
 ;;; Modified for Slimv:
-;;; - load contribs
 ;;; - don't close connection
+;;; - pass swank port in environment variable
 
 (load (merge-pathnames "swank-loader.lisp" *load-truename*))
 
 (swank-loader:init
  :delete nil         ; delete any existing SWANK packages
  :reload nil         ; reload SWANK, even if the SWANK package already exists
- :load-contribs t)   ; load all contribs
+ :load-contribs nil) ; load all contribs
 
 (defun my-getenv (name &optional default)
   #+CMU