Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 381ef2771968fc174b82f2a8c874bf13e03433be 1 parent 2f175e3
@ryepup authored
Showing with 10 additions and 3 deletions.
  1. +10 −3 slime-helper.lisp
View
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
+ ;; http://www.gnu.org/software/emacs/windows/big.html#index-HOME-directory-49
+ ;; 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

@mon-key

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 :)

@ryepup
Owner

sp: see the next commit, http://github.com/ryepup/quicklisp-slime-helper/commit/ddfbf8c934f8b946359c5e2968c7cedbb99c5f87 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.
Something went wrong with that request. Please try again.