branch: externals/sly commit cd85cf6c5c5643cf55b30356dc77b80c5b38dd14 Author: Chris Schafmeister <meis...@temple.edu> Commit: João Távora <joaotav...@gmail.com>
Improve xref definitions for M-. in clasp Print much nicer messages for M-. for methods. * slynk/backend/clasp.lisp (make-dspec): New helper. (find-definitions): Use it. Cherry-picked-from: SLIME commit 66d332cee3a15d5f3d4846a4934469e0f927f688 Co-authored-by: João Távora <joaotav...@gmail.com> --- slynk/backend/clasp.lisp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/slynk/backend/clasp.lisp b/slynk/backend/clasp.lisp index 3710aa8..f0f8a8b 100644 --- a/slynk/backend/clasp.lisp +++ b/slynk/backend/clasp.lisp @@ -610,12 +610,18 @@ (list :position (ext:source-location-offset location)) '(:align t))) +(defun make-dspec (name location) + (list* (ext:source-location-definer location) + name + (ext:source-location-description location))) + (defimplementation find-definitions (name) (loop for kind in ext:*source-location-kinds* for locations = (ext:source-location name kind) when locations - nconc (loop for location in locations - collect (list kind (translate-location location))))) + nconc (loop for location in locations + collect (list (make-dspec name location) + (translate-location location))))) (defun source-location (object) (let ((location (ext:source-location object t)))