comparison .elisp/textmate.el @ 171:2f865a7f84e6

textmate: do not trust cached project root of $HOME
author Augie Fackler <durin42@gmail.com>
date Wed, 16 Dec 2009 22:18:43 -0600
parents 668268f29a88
children c35b58b40fcb
comparison
equal deleted inserted replaced
170:98000a1107bf 171:2f865a7f84e6
421 421
422 (defun textmate-project-root () 422 (defun textmate-project-root ()
423 "Returns the current project root." 423 "Returns the current project root."
424 (when (or 424 (when (or
425 (null *textmate-project-root*) 425 (null *textmate-project-root*)
426 (not (string-match *textmate-project-root* default-directory))) 426 (not (string-match *textmate-project-root* default-directory))
427 (not (string-match *textmate-project-root* (getenv "HOME"))))
427 (let ((root (textmate-find-project-root))) 428 (let ((root (textmate-find-project-root)))
428 (if root 429 (if root
429 (setq *textmate-project-root* (expand-file-name (concat root "/"))) 430 (setq *textmate-project-root* (expand-file-name (concat root "/")))
430 (setq *textmate-project-root* nil)))) 431 (setq *textmate-project-root* nil))))
431 *textmate-project-root*) 432 *textmate-project-root*)