[slime-devel] slime-buffer-package not getting set in *slime-repl*

William C. Halliburton will at licentiae.com
Thu Nov 6 02:23:17 UTC 2003



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







More information about the slime-devel mailing list