Browse files

figured out some elisp to calculate the path to slime-helper.el based…

… on where emacs thinks "~" is. On windows this can be many different places. I think this will work as long as quicklisp's ~ and emac's ~ are on the same drive letter.
  • Loading branch information...
1 parent 2f175e3 commit 381ef2771968fc174b82f2a8c874bf13e03433be @ryepup committed Oct 9, 2010
Showing with 10 additions and 3 deletions.
  1. +10 −3 slime-helper.lisp
13 slime-helper.lisp
@@ -22,9 +22,16 @@
(ensure-installed (find-system "swank"))
(format t "~&slime-helper.el installed in ~S~%~%"
(namestring target))
+ (format t "To use, add this to your ~~/.emacs:~%~%")
+ #+win32
+ (progn
+ ;; windows emacs can map ~ all over the place, see
+ ;;
+ ;; emit elisp so emacs calculates the right path to slime-helper.el based on where it thinks ~ is
+ (format t " (load (expand-file-name (file-relative-name ~S (getenv \"HOME\"))))~%" (namestring target)))
+ #-win32
(let ((enough (enough-namestring target (user-homedir-pathname))))
(unless (equal (pathname enough) target)
(setf enough (format nil "~~/~A" enough)))
- (format t "To use, add this to your ~~/.emacs:~%~%")
- (format t " (load (expand-file-name ~S))~%" enough)
- (format t " (require 'slime)~%~%"))))
+ (format t " (load (expand-file-name ~S))~%" enough))
+ (format t " (require 'slime)~%~%")))

2 comments on commit 381ef27


Heh, elisps `expand-file-name' is a dog on w32 -- didn't take long to get bit by that one huh? Tried to tell you this would happen Zach :)


sp: see the next commit, it uses lisp to get the full path, so emacs can just deal with something like (load "c:\blah\blah\blah.el")

Please sign in to comment.