[slime-cvs] CVS slime
CVS User trittweiler
trittweiler at common-lisp.net
Mon Feb 22 21:38:46 UTC 2010
Update of /project/slime/cvsroot/slime
In directory cl-net:/tmp/cvs-serv27832
Modified Files:
ChangeLog swank-backend.lisp swank-sbcl.lisp
Log Message:
* swank-backend.lisp (converting-errors-to-error-location): Moved
here from swank-sbcl.lisp so other backends can make use of it, too.
* swank-sbcl.lisp: The above macro was called slightly
differently, so update uses accordingly.
--- /project/slime/cvsroot/slime/ChangeLog 2010/02/22 12:56:36 1.1993
+++ /project/slime/cvsroot/slime/ChangeLog 2010/02/22 21:38:45 1.1994
@@ -1,5 +1,13 @@
2010-02-22 Tobias C. Rittweiler <tcr at freebits.de>
+ * swank-backend.lisp (converting-errors-to-error-location): Moved
+ here from swank-sbcl.lisp so other backends can make use of it, too.
+
+ * swank-sbcl.lisp: The above macro was called slightly
+ differently, so update uses accordingly.
+
+2010-02-22 Tobias C. Rittweiler <tcr at freebits.de>
+
Make M-. be able to jump right into the C source for ECL.
Because it's based on TAGS files, M-. and M-* will DTRT once in a
--- /project/slime/cvsroot/slime/swank-backend.lisp 2010/02/22 12:40:30 1.193
+++ /project/slime/cvsroot/slime/swank-backend.lisp 2010/02/22 21:38:46 1.194
@@ -828,6 +828,18 @@
(defstruct (:position (:type list) :named (:constructor)) pos)
(defstruct (:tag (:type list) :named (:constructor)) tag1 tag2)
+(defmacro converting-errors-to-error-location (&body body)
+ "Catches errors during BODY and converts them to an error location."
+ (let ((gblock (gensym "CONVERTING-ERRORS+")))
+ `(block ,gblock
+ (handler-bind ((error
+ #'(lambda (e)
+ (if *debug-swank-backend*
+ nil ;decline
+ (return-from ,gblock
+ (make-error-location e))))))
+ , at body))))
+
(defun make-error-location (datum &rest args)
(cond ((typep datum 'condition)
`(:error ,(format nil "Error: ~A" datum)))
--- /project/slime/cvsroot/slime/swank-sbcl.lisp 2010/01/05 21:20:38 1.266
+++ /project/slime/cvsroot/slime/swank-sbcl.lisp 2010/02/22 21:38:46 1.267
@@ -641,18 +641,6 @@
;;;; Definitions
-(defmacro converting-errors-to-location (&body body)
- "Catches error and converts them to an error location."
- (let ((gblock (gensym "CONVERTING-ERRORS+")))
- `(block ,gblock
- (handler-bind ((error
- #'(lambda (e)
- (if *debug-swank-backend*
- nil ;decline
- (return-from ,gblock
- (make-error-location e))))))
- , at body))))
-
(defparameter *definition-types*
'(:variable defvar
:constant defconstant
@@ -693,7 +681,7 @@
for defsrcs = (sb-introspect:find-definition-sources-by-name name type)
append (loop for defsrc in defsrcs collect
(list (make-dspec type name defsrc)
- (converting-errors-to-location
+ (converting-errors-to-error-location
(definition-source-for-emacs defsrc type name))))))
(defimplementation find-source-location (obj)
@@ -717,7 +705,7 @@
(with-output-to-string (s)
(print-unreadable-object (obj s :type t :identity t))))
(t (princ-to-string obj)))))
- (converting-errors-to-location
+ (converting-errors-to-error-location
(let ((defsrc (sb-introspect:find-definition-source obj)))
(definition-source-for-emacs defsrc
(general-type-of obj)
@@ -853,7 +841,7 @@
(defun source-location-for-xref-data (xref-data)
(destructuring-bind (name . defsrc) xref-data
- (list name (converting-errors-to-location
+ (list name (converting-errors-to-error-location
(definition-source-for-emacs defsrc 'function name)))))
(defimplementation list-callers (symbol)
@@ -895,7 +883,7 @@
"Describe where the function FN was defined.
Return a list of the form (NAME LOCATION)."
(let ((name (function-name fn)))
- (list name (converting-errors-to-location
+ (list name (converting-errors-to-error-location
(function-source-location fn name)))))
;;; macroexpansion
@@ -1142,7 +1130,7 @@
;;; source-path-file-position and friends are in swank-source-path-parser
(defimplementation frame-source-location (index)
- (converting-errors-to-location
+ (converting-errors-to-error-location
(code-location-source-location
(sb-di:frame-code-location (nth-frame index)))))
More information about the slime-cvs
mailing list