Permalink
Browse files

hsenv.el uses regex (instead of char-list-to-string unavailable in em…

…acs-24)
  • Loading branch information...
1 parent b4978f2 commit fbdae4f296908a9e9ddac63c47d5d54490276f50 @Paczesiowa committed May 7, 2012
Showing with 2 additions and 5 deletions.
  1. +2 −5 virthualenv.el
View
@@ -10,11 +10,8 @@
(defun virthualenv-activate (dir)
"Activate the Virtual Haskell Environment in DIR"
(interactive "Dvirthualenv directory: ")
- (when (equal (char-list-to-string (last (string-to-list dir)))
- "/")
- (setq dir (subseq dir
- 0
- (- (length dir) 1))))
+ (when (string-match "^.*/$" dir)
+ (setq dir (substring dir 0 -1)))
(let* ((virthualenv-dir (concat dir "/.virthualenv/"))
(path-var-prependix-location (concat virthualenv-dir "path_var_prependix"))
(ghc-package-path-var-location (concat virthualenv-dir "ghc_package_path_var"))

0 comments on commit fbdae4f

Please sign in to comment.