branch: externals/sly
commit 0abe7361678365a878cc5a9a848593c5eb5a98fa
Author: Stas Boukarev <[email protected]>
Commit: João Távora <[email protected]>
Define a macro in time
* slynk/backend/sbcl.lisp (categorize-definition-source): Move down again.
Cherry-picked-from: SLIME commit fce533e4d093a049ba8345e81be7bb33d5c1c70e
Co-authored-by: João Távora <[email protected]>
---
slynk/backend/sbcl.lisp | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/slynk/backend/sbcl.lisp b/slynk/backend/sbcl.lisp
index 739f0ba..728ab88 100644
--- a/slynk/backend/sbcl.lisp
+++ b/slynk/backend/sbcl.lisp
@@ -826,17 +826,6 @@ QUALITIES is an alist with (quality . value)"
name
(sb-introspect::definition-source-description source-location)))
-(defun categorize-definition-source (definition-source)
- (with-definition-source (pathname form-path character-offset plist)
- definition-source
- (let ((file-p (and pathname (probe-file pathname)
- (or form-path character-offset))))
- (cond ((and (getf plist :emacs-buffer) file-p) :buffer-and-file)
- ((getf plist :emacs-buffer) :buffer)
- (file-p :file)
- (pathname :file-without-position)
- (t :invalid)))))
-
(defimplementation find-definitions (name)
(loop for type in *definition-types* by #'cddr
for defsrcs = (remove :invalid
@@ -895,6 +884,17 @@ QUALITIES is an alist with (quality . value)"
(t (error "Malformed syntax in WITH-STRUCT: ~A" name))))
,@body)))))
+(defun categorize-definition-source (definition-source)
+ (with-definition-source (pathname form-path character-offset plist)
+ definition-source
+ (let ((file-p (and pathname (probe-file pathname)
+ (or form-path character-offset))))
+ (cond ((and (getf plist :emacs-buffer) file-p) :buffer-and-file)
+ ((getf plist :emacs-buffer) :buffer)
+ (file-p :file)
+ (pathname :file-without-position)
+ (t :invalid)))))
+
#+#.(slynk-backend:with-symbol 'definition-source-form-number 'sb-introspect)
(defun form-number-position (definition-source stream)
(let* ((tlf-number (car (sb-introspect:definition-source-form-path
definition-source)))