Skip to content

Instantly share code, notes, and snippets.

@zakki
Created May 26, 2015 06:16
Show Gist options
  • Save zakki/8e9e8058a19b24eb346e to your computer and use it in GitHub Desktop.
Save zakki/8e9e8058a19b24eb346e to your computer and use it in GitHub Desktop.
howm
(defvar *howm-truname-cache* nil)
(defun howm-file-truename (filename)
(or
(cdr (assoc filename *howm-truname-cache*))
(let ((f (file-truename (expand-file-name filename))))
(add-to-list '*howm-truname-cache* (cons filename f))
f)))
(defun howm-normalize-file-name (filename)
(let ((f (howm-file-truename (expand-file-name filename))))
;; for meadow
(if (string-match "^[A-Z]:" f)
(let ((drive (substring f 0 1))
(rest (substring f 1)))
(concat (downcase drive) rest))
f)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment