From 2a1671a6b34f0d4c651e6ddc806715106b9ece6f Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Wed, 16 Mar 2016 19:18:55 -0700 Subject: [PATCH] remove project-root-of-file --- dotfiles/emacs.d/init.el | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/dotfiles/emacs.d/init.el b/dotfiles/emacs.d/init.el index 70675084..a6b92889 100644 --- a/dotfiles/emacs.d/init.el +++ b/dotfiles/emacs.d/init.el @@ -473,30 +473,6 @@ buffer is not visiting a file." (cond ((eq system-type 'darwin) 'notification-center) ((eq system-type 'gnu/linux) 'notify-send))) -(defun project-root-of-file (filename) - "Retrieves the root directory of a project if available. -The current directory is assumed to be the project's root otherwise." - (file-truename - (let ((dir (file-truename filename))) - (or (--reduce-from - (or acc - (let* ((cache-key (format "%s-%s" it dir)) - (cache-value (gethash cache-key - projectile-project-root-cache))) - (if cache-value - (if (eq cache-value 'no-project-root) - nil - cache-value) - (let ((value (funcall it dir))) - (puthash cache-key (or value 'no-project-root) - projectile-project-root-cache) - value)))) - nil - projectile-project-root-files-functions) - (if projectile-require-project-root - (error "You're not in a project") - default-directory))))) - ;; ============================================================================= ;; General Emacs Options ;; =============================================================================