[slime-cvs] CVS slime

CVS User heller heller at common-lisp.net
Mon Apr 12 18:38:51 UTC 2010


Update of /project/slime/cvsroot/slime
In directory cl-net:/tmp/cvs-serv4379

Modified Files:
	ChangeLog slime.el 
Log Message:
Fix compile-file for various backends.

* slime.el (slime-compile-file): Only pass non-nil keyword args to
Lisp.
(slime-simplify-plist): New helper.
(slime-compile-and-load-file): Pass policy parameter directly
without using global variables.

* swank.lisp (compile-file-for-emacs): Change singature sightly.

--- /project/slime/cvsroot/slime/ChangeLog	2010/04/06 03:05:25	1.2057
+++ /project/slime/cvsroot/slime/ChangeLog	2010/04/12 18:38:51	1.2058
@@ -4,6 +4,18 @@
 	compilation-mode, which was enabled previously by
 	slime-insert-compilation-log.
 
+2010-04-12  Helmut Eller  <heller at common-lisp.net>
+
+	Fix compile-file for various backends.
+
+	* slime.el (slime-compile-file): Only pass non-nil keyword args to
+	Lisp.
+	(slime-simplify-plist): New helper.
+	(slime-compile-and-load-file): Pass policy parameter directly
+	without using global variables.
+
+	* swank.lisp (compile-file-for-emacs): Change singature sightly.
+
 2010-04-05  Stas Boukarev  <stassats at gmail.com>
 
 	* slime.el (slime-doc-bindings): Move slime-apropos to C-c C-d A,
--- /project/slime/cvsroot/slime/slime.el	2010/04/06 03:05:25	1.1297
+++ /project/slime/cvsroot/slime/slime.el	2010/04/12 18:38:51	1.1298
@@ -2561,15 +2561,14 @@
 `slime-next-note' and `slime-previous-note' can be used to navigate
 between compiler notes and to display their full details."
   (interactive "P")
-  (let ((slime-compilation-policy (slime-compute-policy policy)))
-    (slime-compile-file t)))
+  (slime-compile-file t (slime-compute-policy policy)))
 
 ;;; FIXME: This should become a DEFCUSTOM
 (defvar slime-compile-file-options '()
   "Plist of additional options that C-c C-k should pass to Lisp.
 Currently only :fasl-directory is supported.")
 
-(defun slime-compile-file (&optional load)
+(defun slime-compile-file (&optional load policy)
   "Compile current buffer's file and highlight resulting compiler notes.
 
 See `slime-compile-and-load-file' for further details."
@@ -2581,14 +2580,19 @@
              (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 ((file (slime-to-lisp-filename (buffer-file-name))))
+  (let ((file (slime-to-lisp-filename (buffer-file-name)))
+        (options (slime-simplify-plist `(, at slime-compile-file-options
+                                         :policy ,policy))))
     (slime-eval-async
-     `(swank:compile-file-for-emacs ,file ,(if load t nil) 
-                                    :options ',slime-compile-file-options
-                                    :policy ',slime-compilation-policy)
-     #'slime-compilation-finished)
+        `(swank:compile-file-for-emacs ,file ,(if load t nil) . ,options)
+      #'slime-compilation-finished)
     (message "Compiling %s..." file)))
 
+(defun slime-simplify-plist (plist)
+  (loop for (key val) on plist by #'cddr 
+        append (cond ((null val) '())
+                     (t (list key val)))))
+
 (defun slime-compile-defun (&optional raw-prefix-arg)
   "Compile the current toplevel form. 
 





More information about the slime-cvs mailing list