[slime-cvs] CVS update: slime/slime.el

Alan Ruttenberg aruttenberg at common-lisp.net
Mon Sep 13 05:36:28 UTC 2004


Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv8482/slime

Modified Files:
	slime.el 
Log Message:

slime-goto-location-position: New location specifiers:

(:method name specializers . qualifiers) all are strings. Looks
for defxxx name then the qualifiers as words, in order then the
specializers as words, in order (except for "T", which is
optional). Pass the symbols names for specializers and qualifiers 
(no packages). Used by openmcl but might be useful for others

(:text-anchored <position fixnum> <string> <delta fixnum>) 
Got to position, then search for string, then move delta. To
support upcoming source recording for openmcl debugging.
Date: Mon Sep 13 07:36:27 2004
Author: aruttenberg

Index: slime/slime.el
diff -u slime/slime.el:1.398 slime/slime.el:1.399
--- slime/slime.el:1.398	Mon Sep 13 01:56:39 2004
+++ slime/slime.el	Mon Sep 13 07:36:27 2004
@@ -3698,12 +3698,34 @@
         (re-search-forward 
          (format "[( \t]%s\\>\\(\\s \\|$\\)" name) nil t)))
      (goto-char (match-beginning 0)))
+    ;; Looks for a sequence of words (def<something> method name qualifers specializers
+    ;; don't look for "T" since it isn't requires (arg without t) as class is taken as such.
+    ((:method name specializers . qualifiers)
+     (let ((case-fold-search t)
+           (name (regexp-quote name)))
+       (or 
+        (and 
+	 (re-search-forward 
+	  (setq it (format "\\s *(def\\(\\s_\\|\\sw\\)*\\s +%s\\>%s%s" name
+		  (apply 'concat (mapcan (lambda(el) (list ".+?\\<" el "\\>")) qualifiers))
+		  (apply 'concat (mapcan (lambda(el) (list ".+?\\<" el "\\>")) (remove "T" specializers)))
+		  )) nil t)
+	 (goto-char (match-beginning 0)))
+;	(slime-goto-location-position `(:function-name ,name))
+	
+	)))
     ((:source-path source-path start-position)
      (cond (start-position
             (goto-char start-position)
             (slime-forward-positioned-source-path source-path))
            (t
-            (slime-forward-source-path source-path))))))
+            (slime-forward-source-path source-path))))
+    ;; Goes to "start" then looks for the anchor text, then moves delta from that position.
+    ((:text-anchored start text delta)
+     (goto-char start)
+     (slime-isearch text)
+     (forward-char delta))
+    ))
 
 (defun slime-goto-source-location (location &optional noerror)
   "Move to the source location LOCATION.  Several kinds of locations
@@ -3719,7 +3741,9 @@
 <position> ::= (:position <fixnum> [<align>]) ; 1 based
              | (:line <fixnum> [<fixnum>])
              | (:function-name <string>)
-             | (:source-path <list> <start-position>) "
+             | (:source-path <list> <start-position>) 
+             | (:text-anchored <fixnum> <string> <fixnum>) 
+             | (:method <name string> <specializer strings> . <qualifiers strings>)"
   (destructure-case location
     ((:location buffer position hints)
      (slime-goto-location-buffer buffer)





More information about the slime-cvs mailing list