[slime-devel] couple of additions

Alan Ruttenberg alanralanr at comcast.net
Fri Dec 12 04:48:23 UTC 2003


Hi,

Looks like a great project! I'm using openmcl and have run into a few 
issues :)
Here's fixes for a couple of them:

for swank-openmcl.lisp add the following to enable trace functionality

(defun tracedp (fname)
   (ccl::%traced-p fname))

(defslimefun toggle-trace-fdefinition (fname-string)
   (let ((fname (from-string fname-string)))
     (cond ((tracedp fname)
	   (ccl::%untrace-1 fname)
	   (format nil "~S is now untraced." fname))
	  (t
	   (ccl::%trace-0 (list fname))
	   (format nil "~S is now traced." fname)))))

slime-edit-fdefinition fails when either the symbol entered has a 
package prefix, or when the definition itself has a package prefix. 
Here's how I repaired it:

In slime.el, slime-goto-source-location

        ((:function-name name)
         ;; pay attention to the package name
	(let ((package (slime-buffer-package)))
	  (if (string-match ":" name)
	      (progn
		(string-match "\\(.*\\):+\\(.*\\)" name)
		(setq name (substring name (match-beginning 2) (match-end 2)))
		(setq package (substring name (match-beginning 1) (match-end 1)))
		))

         (let ((case-fold-search t)) ;;  maybe the use explicity 
mentions the package (maybe not)
           (re-search-forward (format "^(\\(def.*[ 
\n\t(]\\)?\\(%s\\)?:?:?%s[ \t)]" package name))))

         (goto-char (match-beginning 0)))

-Alan





More information about the slime-devel mailing list