I noticed that the function completions while in a package in *slime-repl* were not correct.
It seems that slime-find-buffer-package does not work for the repl. Looks like the regex wants it at the beginning of the line. Now sync-package-and-default-directory works in the repl because it calls swank:set-package with NIL which returns the current package. I changed sync-package-and-default-directory to be
(defun slime-sync-package-and-default-directory () (interactive) (let ((package (slime-eval `(swank:set-package ,(slime-find-buffer-package)))) (directory (slime-eval `(swank:set-default-directory ,(expand-file-name default-directory))))) (setq slime-buffer-package package) ;;; <----- added this line (message "package: %s default-directory: %s" package directory)))
Which works for my purposes but may not be the best way.
Thanks, William Halliburton
"William C. Halliburton" will@licentiae.com writes:
I noticed that the function completions while in a package in *slime-repl* were not correct.
It seems that slime-find-buffer-package does not work for the repl.
Well spotted. In fact, we already keep track of which package the repl is supposed to use in `slime-lisp-package' - this is how we generate the prompt. So I changed (slime-buffer-package) to return this value for slime-repl-mode buffers, i.e. *slime-repl*.
Cheers, Luke