[slime-cvs] CVS slime

heller heller at common-lisp.net
Wed Sep 19 11:58:21 UTC 2007


Update of /project/slime/cvsroot/slime
In directory clnet:/tmp/cvs-serv18383

Modified Files:
	ChangeLog slime.el 
Log Message:
Simplify slime-compile-file.

* slime.el (slime-compile-file): Don't save window config.
(slime-curry, slime-rcurry): New functions.



--- /project/slime/cvsroot/slime/ChangeLog	2007/09/19 11:55:45	1.1229
+++ /project/slime/cvsroot/slime/ChangeLog	2007/09/19 11:58:20	1.1230
@@ -1,5 +1,10 @@
 2007-09-19  Helmut Eller  <heller at common-lisp.net>
 
+	Simplify slime-compile-file.
+
+	* slime.el (slime-compile-file): Don't save window config.
+	(slime-curry, slime-rcurry): New functions.
+
 	* slime.el (slime-complete-symbol*-fancy): Move defcustom to
 	contrib/slime-c-p-c.el
 
--- /project/slime/cvsroot/slime/slime.el	2007/09/19 11:55:45	1.871
+++ /project/slime/cvsroot/slime/slime.el	2007/09/19 11:58:20	1.872
@@ -892,6 +892,12 @@
   (slime-with-rigid-indentation nil
     (apply #'insert strings)))
 
+(defun slime-curry (fun &rest args)
+  `(lambda (&rest more) (apply ',fun (append ',args more))))
+
+(defun slime-rcurry (fun &rest args)
+  `(lambda (&rest more) (apply ',fun (append more ',args))))
+
 ;;;;; Snapshots of current Emacs state
 
 ;;; Window configurations do not save (and hence not restore)
@@ -1267,13 +1273,13 @@
          (slime-load-file-set-package filename package))
         (t
          (slime-start-and-init (slime-lisp-options)
-                               #'slime-start-and-load filename package))))
+                               (slime-curry #'slime-start-and-load 
+                                            filename package)))))
 
-(defun slime-start-and-init (options fun &rest args)
-  (lexical-let* ((fun fun) (args args)
-                 (rest (plist-get options :init-function))
-                 (init (cond (rest (lambda () (funcall rest) (apply fun args)))
-                             (t (lambda () (apply fun args))))))
+(defun slime-start-and-init (options fun)
+  (let* ((rest (plist-get options :init-function))
+         (init (cond (rest `(lambda () (funcall ',rest) (funcall ',fun)))
+                     (t fun))))
     (slime-start* (plist-put (copy-list options) :init-function init))))
 
 (defun slime-load-file-set-package (filename package)
@@ -3879,19 +3885,14 @@
              (y-or-n-p (format "Save file %s? " (buffer-file-name))))
     (save-buffer))
   (run-hook-with-args 'slime-before-compile-functions (point-min) (point-max))
-  (let ((lisp-filename (slime-to-lisp-filename (buffer-file-name)))
-        (snapshot (slime-current-emacs-snapshot)))
-    (slime-insert-transcript-delimiter
-     (format "Compile file %s" lisp-filename))
-    ;; The following may alter the current window configuration, so we saved
-    ;; it above to pass it on for it to be properly restored!
+  (let ((file (slime-to-lisp-filename (buffer-file-name))))
+    (slime-insert-transcript-delimiter (format "Compile file %s" file))
     (when slime-display-compilation-output
       (slime-display-output-buffer))
-    (slime-eval-async
-     `(swank:compile-file-for-emacs 
-       ,lisp-filename ,(if load t nil))
-     (slime-make-compilation-finished-continuation (current-buffer) snapshot))
-    (message "Compiling %s.." lisp-filename)))
+    (slime-eval-async 
+     `(swank:compile-file-for-emacs ,file ,(if load t nil))
+     (slime-rcurry #'slime-compilation-finished (current-buffer)))
+    (message "Compiling %s..." file)))
 
 (defun slime-compile-defun ()
   "Compile the current toplevel form."




More information about the slime-cvs mailing list