Luke Gorrie luke@synap.se writes:
Nice catch! Fixed now.
Thanks!
By the way, I see a strange error when M-. wants to present an XREF buffer for choosing the right definition:
Debugger entered--Lisp error: (void-variable package) (slime-init-xref-buffer package G30383 G30384) (progn (slime-init-xref-buffer package G30383 G30384) (make-local-variable (quote slime-xref-saved-window-configuration)) (setq slime-xref-saved-window-configuration (current-window-configuration))) (prog2 (progn (slime-init-xref-buffer package G30383 G30384) (make-local-variable ...) (setq slime-xref-saved-window-configuration ...)) (progn (slime-insert-xrefs xrefs) (goto-char ...) (forward-line) (skip-chars-forward " ")) (setq buffer-read-only t) (select-window (or ... ...)) (shrink-window-if-larger-than-buffer)) (save-current-buffer (set-buffer (get-buffer-create ...)) (prog2 (progn ... ... ...) (progn ... ... ... ...) (setq buffer-read-only t) (select-window ...) (shrink-window-if-larger-than-buffer))) (with-current-buffer (get-buffer-create (format "*XREF[%s: %s]*" G30383 G30384)) (prog2 (progn ... ... ...) (progn ... ... ... ...) (setq buffer-read-only t) (select-window ...) (shrink-window-if-larger-than-buffer))) (let ((G30383 type) (G30384 symbol)) (with-current-buffer (get-buffer-create ...) (prog2 ... ... ... ... ...))) (slime-with-xref-buffer (package type symbol) (slime-insert-xrefs xrefs) (goto-char (point-min)) (forward-line) (skip-chars-forward " ")) (if (null xrefs) (message "No references found for %s." symbol) (setq slime-next-location-function (quote slime-goto-next-xref)) (slime-with-xref-buffer (package type symbol) (slime-insert-xrefs xrefs) (goto-char ...) (forward-line) (skip-chars-forward " "))) slime-show-xrefs((("format" ("(:COMPILER-MACRO FORMAT)" :error "Definition of type :COMPILER-MACRO not found for FORMAT") ("(:OPERATOR FORMAT)" :error "Definition of type :OPERATOR not found for FORMAT"))) definition "format" ":LRESTR") slime-show-definitions("format" (("(:COMPILER-MACRO FORMAT)" (:error "Definition of type :COMPILER-MACRO not found for FORMAT")) ("(:OPERATOR FORMAT)" (:error "Definition of type :OPERATOR not found for FORMAT")))) (if (slime-length> definitions 1) (slime-show-definitions name definitions) (let (...) (destructure-case ... ... ...))) slime-goto-definition("format" (("(:COMPILER-MACRO FORMAT)" (:error "Definition of type :COMPILER-MACRO not found for FORMAT")) ("(:OPERATOR FORMAT)" (:error "Definition of type :OPERATOR not found for FORMAT"))) nil) (if (null definitions) (if slime-edit-definition-fallback-function (funcall slime-edit-definition-fallback-function name) (error "No known definition for: %s" name)) (slime-goto-definition name definitions where)) (let ((definitions ...)) (if (null definitions) (if slime-edit-definition-fallback-function ... ...) (slime-goto-definition name definitions where))) slime-edit-definition("format") * call-interactively(slime-edit-definition)
Does anyone else see this?
The funny thing is that I can work around this error like this:
--- slime.el.~1.476.~ 2005-04-01 14:50:11.000000000 +0200 +++ slime.el 2005-04-01 15:16:48.405926000 +0200 @@ -5943,12 +5943,12 @@ (backward-char 1) (delete-char 1))
-(defun slime-show-xrefs (xrefs type symbol package) +(defun slime-show-xrefs (xrefs type symbol yyy-package) "Show the results of an XREF query." (if (null xrefs) (message "No references found for %s." symbol) (setq slime-next-location-function 'slime-goto-next-xref) - (slime-with-xref-buffer (package type symbol) + (slime-with-xref-buffer (yyy-package type symbol) (slime-insert-xrefs xrefs) (goto-char (point-min)) (forward-line)
I observed with edebug that the binding for `package' magically disappears in the buffer that `with-current-buffer' (in the macroexpansion of slime-with-xref-buffer) switches to. Any idea?
Cheers