[slime-devel] slime-compile-file save prompting

This is a patch to make slime-compile-file only prompt to save the buffer that it is run in. Sometimes I have many modified buffers open (some non-lisp), and having it ask to save then all when I hit C-c C-k is bothersome. (The patch line numbers might be a little screwy, as it came out of my fuzzy-patched Slime.) -bcd -- *** Brian Downing <bdowning at lavos dot net>

Brian Downing <bdowning@lavos.net> writes:
This is a patch to make slime-compile-file only prompt to save the buffer that it is run in. Sometimes I have many modified buffers open (some non-lisp), and having it ask to save then all when I hit C-c C-k is bothersome.
Good idea! Checked in, but I did it a little differently because `save-some-buffers' doesn't have the right interface in Emacs20. -Luke

Am I the only one encountering problems with sbcl-mt on Debian unstable? If I run M-x slime the thing are gettig compiled but at the end I get: ; in: LAMBDA NIL ; (SWANK-BACKEND::SBCL-PACKAGE-P SWANK-LOADER::P) ; ; caught STYLE-WARNING: ; undefined function: SWANK-BACKEND::SBCL-PACKAGE-P ; (SWANK-BACKEND::SHEBANG-READTABLE) ; ; caught STYLE-WARNING: ; undefined function: SWANK-BACKEND::SHEBANG-READTABLE ; ; caught STYLE-WARNING: ; These functions are undefined: ; SWANK-BACKEND::SBCL-PACKAGE-P SWANK-BACKEND::SHEBANG-READTABLE ; ; compilation unit finished ; caught 3 STYLE-WARNING conditions I simply did not get it, this is what one can find in swank-sbcl.lisp (defun feature-in-list-p (feature list) (etypecase feature (symbol (member feature list :test #'eq)) (cons (flet ((subfeature-in-list-p (subfeature) (feature-in-list-p subfeature list))) (ecase (first feature) (:or (some #'subfeature-in-list-p (rest feature))) (:and (every #'subfeature-in-list-p (rest feature))) (:not (let ((rest (cdr feature))) (if (or (null (car rest)) (cdr rest)) (error "wrong number of terms in compound feature ~S" feature) (not (subfeature-in-list-p (second feature))))))))))) (defun shebang-reader (stream sub-character infix-parameter) (declare (ignore sub-character)) (when infix-parameter (error "illegal read syntax: #~D!" infix-parameter)) (let ((next-char (read-char stream))) (unless (find next-char "+-") (error "illegal read syntax: #!~C" next-char)) ;; When test is not satisfied ;; FIXME: clearer if order of NOT-P and (NOT NOT-P) were reversed? then ;; would become "unless test is satisfied".. (when (let* ((*package* (find-package "KEYWORD")) (*read-suppress* nil) (not-p (char= next-char #\-)) (feature (read stream))) (if (feature-in-list-p feature *features*) not-p (not not-p))) ;; Read (and discard) a form from input. (let ((*read-suppress* t)) (read stream t nil t)))) (values)) (defvar *shebang-readtable* (let ((*readtable* (copy-readtable nil))) (set-dispatch-macro-character #\# #\! (lambda (s c n) (shebang-reader s c n)) *readtable*) *readtable*)) (defun shebang-readtable () *shebang-readtable*) (defun sbcl-package-p (package) (let ((name (package-name package))) (eql (mismatch "SB-" name) 3))) Well if something is defined than this functions or what am I missing? Friedrich

I used the newest sbcl-mt deb package which is: sbcl-mt_0.8.28+really.0.8.10.48-1_i386.deb Regards Friedrich

Friedrich Dominicus <frido@q-software-solutions.com> writes:
I used the newest sbcl-mt deb package which is: sbcl-mt_0.8.28+really.0.8.10.48-1_i386.deb
Has this version a sb-int:debootstrap-package function and a sb-int:bootstrap-package-not-found condition type? That's needed with SLIME's CVS version. You can downgrade SLIME to the FAIRLY-STABLE, if you don't want upgrade your SBCL . Helmut.

Helmut Eller <e9626484@stud3.tuwien.ac.at> writes:
Friedrich Dominicus <frido@q-software-solutions.com> writes:
I used the newest sbcl-mt deb package which is: sbcl-mt_0.8.28+really.0.8.10.48-1_i386.deb
Has this version a sb-int:debootstrap-package function and a sb-int:bootstrap-package-not-found condition type? That's needed with SLIME's CVS version.
No it does not have such functions. Regards Friedrich

Helmut Eller writes:
Friedrich Dominicus <frido@q-software-solutions.com> writes:
I used the newest sbcl-mt deb package which is: sbcl-mt_0.8.28+really.0.8.10.48-1_i386.deb
Has this version a sb-int:debootstrap-package function and a sb-int:bootstrap-package-not-found condition type? That's needed with SLIME's CVS version.
You can downgrade SLIME to the FAIRLY-STABLE, if you don't want upgrade your SBCL .
Since it looks like I'm not the only one who'd like to use the most recent SLIME with a fairly recent SBCL (like 0.8.8), here's a patch to make SLIME use the debootstrapping facilities only if they're present: --- ChangeLog.~1.417.~ Tue Jun 22 17:43:31 2004 +++ ChangeLog Tue Jun 22 18:20:05 2004 @@ -1,3 +1,10 @@ +2004-06-22 Thomas F. Burdick <tfb@OCF.Berkeley.EDU> + + * swank-sbcl.lisp (call-with-syntax-hooks, with-debootstrapping): + Preserve compatability with fairly recent SBCLs by checking for + the presense of the debootstrapping facilities at macroexpansion + time. + 2004-06-21 Luke Gorrie <luke@bluetail.com> * swank-loader.lisp (*lisp-name*): Add version number to --- swank-sbcl.lisp.~1.91.~ Tue Jun 22 17:43:32 2004 +++ swank-sbcl.lisp Tue Jun 22 18:06:23 2004 @@ -704,12 +704,17 @@ (defun sbcl-package-p (package) (defvar *debootstrap-packages* t) +(defmacro with-debootstrapping (&body body) + (let ((not-found (find-symbol "BOOTSTRAP-PACKAGE-NOT-FOUND" "SB-INT")) + (debootstrap (find-symbol "DEBOOTSTRAP-PACKAGE" "SB-INT"))) + (if (and not-found debootstrap) + `(handler-bind ((,not-found #',debootstrap)) ,@body) + `(progn ,@body)))) + (defimplementation call-with-syntax-hooks (fn) (cond ((and *debootstrap-packages* (sbcl-package-p *package*)) - (handler-bind ((sb-int:bootstrap-package-not-found - #'sb-int:debootstrap-package)) - (funcall fn))) + (with-debootstrapping (funcall fn))) (t (funcall fn))))

"Thomas F. Burdick" <tfb@OCF.Berkeley.EDU> writes:
Since it looks like I'm not the only one who'd like to use the most recent SLIME with a fairly recent SBCL (like 0.8.8), here's a patch to make SLIME use the debootstrapping facilities only if they're present:
Thanks for the patch. It is in CVS. Helmut.
participants (5)
-
Brian Downing
-
Friedrich Dominicus
-
Helmut Eller
-
Luke Gorrie
-
Thomas F. Burdick