? no-hooks-in-swank-asd.diff
Index: swank-loader.lisp
===================================================================
RCS file: /project/slime/cvsroot/slime/swank-loader.lisp,v
retrieving revision 1.81
diff -u -u -r1.81 swank-loader.lisp
--- swank-loader.lisp	20 Feb 2008 22:10:38 -0000	1.81
+++ swank-loader.lisp	25 Feb 2008 13:33:09 -0000
@@ -213,7 +213,7 @@
                          (fasl-dir (contrib-dir *fasl-directory*)))
   (compile-files (src-files *contribs* src-dir) fasl-dir nil))
 
-(defun setup ()
+(defun setup (&key (run-hooks t))
   (flet ((q (s) (read-from-string s)))
     (load-site-init-file *source-directory*)
     (load-user-init-file)
@@ -221,13 +221,14 @@
     (funcall (q "swank::setup") 
              (slime-version-string)
              (list (contrib-dir *fasl-directory*)    
-                   (contrib-dir *source-directory*)))))
+                   (contrib-dir *source-directory*))
+             :run-hooks run-hooks)))
 
-(defun init (&key delete reload)
+(defun init (&key delete reload (run-hooks t))
   (when (and delete (find-package :swank))
     (mapc #'delete-package '(:swank :swank-io-package :swank-backend)))
   (cond ((or (not (find-package :swank)) reload)
          (load-swank))
         (t 
          (warn "Not reloading SWANK.  Package already exists.")))
-  (setup))
+  (setup :run-hooks run-hooks))
Index: swank.asd
===================================================================
RCS file: /project/slime/cvsroot/slime/swank.asd,v
retrieving revision 1.6
diff -u -u -r1.6 swank.asd
--- swank.asd	17 Feb 2008 12:28:27 -0000	1.6
+++ swank.asd	25 Feb 2008 13:33:09 -0000
@@ -37,7 +37,9 @@
   (load (asdf::component-pathname f))
   (funcall (read-from-string "swank-loader::init")
            :reload (asdf::operation-forced o)
-           :delete (asdf::operation-forced o)))
+           :delete (asdf::operation-forced o)
+           ;; don't run hooks before emacs side starts up:
+           :run-hooks nil))
 
 (asdf:defsystem :swank
   :default-component-class swank-loader-file
Index: swank.lisp
===================================================================
RCS file: /project/slime/cvsroot/slime/swank.lisp,v
retrieving revision 1.536
diff -u -u -r1.536 swank.lisp
--- swank.lisp	24 Feb 2008 16:49:49 -0000	1.536
+++ swank.lisp	25 Feb 2008 13:33:09 -0000
@@ -3069,10 +3069,11 @@
 
 (add-hook *pre-reply-hook* 'sync-indentation-to-emacs)
 
-(defun setup (version load-path)
+(defun setup (version load-path &key (run-hooks t))
   (setq *swank-wire-protocol-version* version)
   (setq *load-path* load-path)
   (swank-backend::warn-unimplemented-interfaces)
-  (run-hook *after-init-hook*))
+  (when run-hooks
+    (run-hook *after-init-hook*)))
 
 ;;; swank.lisp ends here
