Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updates for CLISP-2.46.

Patch by Masayuki Onjo.

* swank-clisp.lisp (fspec-pathname, fspec-location): The structure
of (documentation symbol 'sys::file) used to be (path . lines)
but is now ((type path . lines) ...).
  • Loading branch information...
commit b2f24101d1125556dcb29b1fb0fcdd97d7891c72 1 parent d3e832b
Helmut Eller authored
Showing with 35 additions and 22 deletions.
  1. +10 −0 ChangeLog
  2. +25 −22 swank-clisp.lisp
View
10 ChangeLog
@@ -1,5 +1,15 @@
+2008-08-04 Masayuki Onjo <masayuki.onjo@gmail.com>
+
+ Updates for CLISP-2.46.
+
+ * swank-clisp.lisp (fspec-pathname, fspec-location): The structure
+ of (documentation symbol 'sys::file) used to be (path . lines)
+ but is now ((type path . lines) ...).
+
2008-08-04 Helmut Eller <heller@common-lisp.net>
+
+
* swank-gray.lisp (slime-output-stream): Add a slot
"interactive-p" which should be true for streams which are flushed
periodically by the Lisp system. Update the relevant backends
View
47 swank-clisp.lisp
@@ -212,12 +212,14 @@ Return NIL if the symbol is unbound."
(:function (describe (symbol-function symbol)))
(:class (describe (find-class symbol)))))
-(defun fspec-pathname (symbol)
- (let ((path (documentation symbol 'sys::file))
+(defun fspec-pathname (spec)
+ (let ((path spec)
+ type
lines)
(when (consp path)
- (psetq path (car path)
- lines (cdr path)))
+ (psetq type (car path)
+ path (cadr path)
+ lines (cddr path)))
(when (and path
(member (pathname-type path)
custom:*compiled-file-types* :test #'equal))
@@ -225,24 +227,26 @@ Return NIL if the symbol is unbound."
(loop for suffix in custom:*source-file-types*
thereis (probe-file (make-pathname :defaults path
:type suffix)))))
- (values path lines)))
+ (values path type lines)))
-(defun fspec-location (fspec)
- (multiple-value-bind (file lines)
+(defun fspec-location (name fspec)
+ (multiple-value-bind (file type lines)
(fspec-pathname fspec)
- (cond (file
- (multiple-value-bind (truename c) (ignore-errors (truename file))
- (cond (truename
- (make-location (list :file (namestring truename))
- (if (consp lines)
- (list* :line lines)
- (list :function-name (string fspec)))))
- (t (list :error (princ-to-string c))))))
- (t (list :error (format nil "No source information available for: ~S"
- fspec))))))
+ (list (if type (list name type) name)
+ (cond (file
+ (multiple-value-bind (truename c) (ignore-errors (truename file))
+ (cond (truename
+ (make-location (list :file (namestring truename))
+ (if (consp lines)
+ (list* :line lines)
+ (list :function-name (string fspec)))
+ (list :snippet (format nil "~A" type))))
+ (t (list :error (princ-to-string c))))))
+ (t (list :error (format nil "No source information available for: ~S"
+ fspec)))))))
(defimplementation find-definitions (name)
- (list (list name (fspec-location name))))
+ (mapcar #'(lambda (e) (fspec-location name e)) (documentation name 'sys::file)))
(defun trim-whitespace (string)
(string-trim #(#\newline #\space #\tab) string))
@@ -573,9 +577,8 @@ Execute BODY with NAME's function slot set to FUNCTION."
(load fasl-file))
nil))))
-(defimplementation swank-compile-string (string &key buffer position directory
- debug)
- (declare (ignore directory debug))
+(defimplementation swank-compile-string (string &key buffer position directory)
+ (declare (ignore directory))
(with-compilation-hooks ()
(let ((*buffer-name* buffer)
(*buffer-offset* position))
@@ -600,7 +603,7 @@ Execute BODY with NAME's function slot set to FUNCTION."
(defun xref-results (symbols)
(let ((xrefs '()))
(dolist (symbol symbols)
- (push (list symbol (fspec-location symbol)) xrefs))
+ (push (fspec-location symbol symbol) xrefs))
xrefs))
(when (find-package :swank-loader)
Please sign in to comment.
Something went wrong with that request. Please try again.