/[slime]/slime/swank-allegro.lisp
ViewVC logotype

Diff of /slime/swank-allegro.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.51 by pseibel, Sat Aug 28 02:27:08 2004 UTC revision 1.52 by heller, Mon Aug 30 22:26:15 2004 UTC
# Line 255  Line 255 
255                 `(in-package ,(package-name *package*))                 `(in-package ,(package-name *package*))
256                 `(eval-when (:compile-toplevel :load-toplevel)                 `(eval-when (:compile-toplevel :load-toplevel)
257                   (setq excl::*source-pathname*                   (setq excl::*source-pathname*
258                    (format nil "~A;~D" ',buffer ',position)))                    ',(format nil "~A;~D" buffer position)))
259                 string)))))                 string)))))
260    
261  ;;;; Definition Finding  ;;;; Definition Finding
# Line 266  Line 266 
266      (list (string (second fspec)))))      (list (string (second fspec)))))
267    
268  (defun find-fspec-location (fspec type)  (defun find-fspec-location (fspec type)
269    (let ((file (excl:source-file fspec type)))    (multiple-value-bind (file err) (ignore-errors (excl:source-file fspec type))
270      (etypecase file      (etypecase file
271        (pathname        (pathname
272         (let* ((start (scm:find-definition-in-file fspec type file))         (let* ((start (scm:find-definition-in-file fspec type file))
# Line 276  Line 276 
276           (make-location (list :file (namestring (truename file)))           (make-location (list :file (namestring (truename file)))
277                          pos)))                          pos)))
278        ((member :top-level)        ((member :top-level)
279         (list :error (format nil "Defined at toplevel: ~A" (fspec->string fspec))))         (list :error (format nil "Defined at toplevel: ~A"
280                                (fspec->string fspec))))
281        (string        (string
282         (let ((pos (position #\; file :from-end t)))         (let ((pos (position #\; file :from-end t)))
283           (make-location           (make-location
284            (list :buffer (subseq file 0 pos))            (list :buffer (subseq file 0 pos))
285            (list :position (parse-integer (subseq file (1+ pos)))))))            (list :position (parse-integer (subseq file (1+ pos)))))))
286        (null        (null
287         (list :error (format nil "Unknown source location for ~A" (fspec->string fspec)))))))         (list :error (if err
288                            (princ-to-string err)
289                            (format nil "Unknown source location for ~A"
290                                    (fspec->string fspec))))))))
291    
292  (defun fspec->string (fspec)  (defun fspec->string (fspec)
293    (etypecase fspec    (etypecase fspec

Legend:
Removed from v.1.51  
changed lines
  Added in v.1.52

  ViewVC Help
Powered by ViewVC 1.1.5