Permalink
Browse files

Hack: make `abbreviated-home-dir' use backslashes or slashes.

  • Loading branch information...
1 parent e2111e9 commit 2e584c37e4b29dc57d9f42146ec97f72f27f79dd @elibarzilay committed Mar 20, 2011
Showing with 8 additions and 0 deletions.
  1. +8 −0 include/misc.el
View
@@ -23,6 +23,14 @@
(cons (concat "^" (file-truename (getenv "HOME")))
(getenv "HOME"))))
+;; Set `abbreviated-home-dir' on windows (hack: rely on its value, it would
+;; break if this value already has ranges).
+(when (eq 'windows-nt system-type)
+ (if (string-match "\\[" abbreviated-home-dir)
+ (warn "looks like `abbreviated-home-dir' has a range, not hacking it")
+ (setq abbreviated-home-dir
+ (replace-regexp-in-string "/" "[/\\\\]" abbreviated-home-dir))))
+
;; get user <-> homedir mappings from /etc/passwd
(defvar eli-user-homedirs
;; taken from "mailalias.el"

0 comments on commit 2e584c3

Please sign in to comment.