Skip to content

Commit

Permalink
(swank-compile-string): Use #\; instead of #\: to separate the
Browse files Browse the repository at this point in the history
position from the buffer-name.
  • Loading branch information
Helmut Eller committed Aug 18, 2004
1 parent 8c1b02d commit 36f4daf
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions swank-allegro.lisp
Expand Up @@ -241,7 +241,7 @@

(defimplementation swank-compile-string (string &key buffer position)
;; We store the source buffer in excl::*source-pathname* as a string
;; of the form <buffername>:<start-offset>. Quite ugly encoding, but
;; of the form <buffername>;<start-offset>. Quite ugly encoding, but
;; the fasl file is corrupted if we use some other datatype.
(with-compilation-hooks ()
(let ((*buffer-name* buffer)
Expand All @@ -252,7 +252,7 @@
`(in-package ,(package-name *package*))
`(eval-when (:compile-toplevel :load-toplevel)
(setq excl::*source-pathname*
(format nil "~A:~D" ',buffer ',position)))
(format nil "~A;~D" ',buffer ',position)))
string)))))

;;;; Definition Finding
Expand All @@ -275,18 +275,21 @@
((member :top-level)
(list :error (format nil "Defined at toplevel: ~A" (fspec->string fspec))))
(string
(let ((pos (position #\: file)))
(let ((pos (position #\; file :from-end t)))
(make-location
(list :buffer (subseq file 0 pos))
(list :position (parse-integer (subseq file (1+ pos)))))))
(null
(list :error (format nil "Unknown source location for ~A" (fspec->string fspec)))))))

(defun fspec->string (fspec &aux (*package* (find-package :keyword)))
(defun fspec->string (fspec)
(etypecase fspec
(symbol (prin1-to-string fspec))
(list (format nil "(method ~A)"
(prin1-to-string (second fspec))))))
(symbol (let ((*package* (find-package :keyword)))
(prin1-to-string fspec)))
(list (format nil "(~A ~A)"
(prin1-to-string (first fspec))
(let ((*package* (find-package :keyword)))
(prin1-to-string (second fspec)))))))

(defun fspec-definition-locations (fspec)
(let ((defs (excl::find-multiple-definitions fspec)))
Expand Down

0 comments on commit 36f4daf

Please sign in to comment.