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 ;; =============================================================================