diff --git a/core/defuns/defuns-spaceline.el b/core/defuns/defuns-spaceline.el deleted file mode 100644 index b3975afcb..000000000 --- a/core/defuns/defuns-spaceline.el +++ /dev/null @@ -1,25 +0,0 @@ -;;; defuns-spaceline.el - -(defvar doom-env-version-hook '() - "Hook that runs whenever the environment version changes (e.g. rbenv/pyenv)") - -;;;###autoload -(defun doom|spaceline-env-update () - (when doom--env-command - (let ((default-directory (doom/project-root))) - (let ((s (shell-command-to-string doom--env-command))) - (setq doom--env-version (if (string-match "[ \t\n\r]+\\'" s) - (replace-match "" t t s) - s)) - (run-hook-with-args 'doom-env-version-hook doom--env-version))))) - -;;;###autoload -(defun doom/-flycheck-count (state) - "Return flycheck information for the given error type STATE." - (when (flycheck-has-current-errors-p state) - (if (eq 'running flycheck-last-status-change) - "?" - (cdr-safe (assq state (flycheck-count-errors flycheck-current-errors)))))) - -(provide 'defuns-spaceline) -;;; defuns-spaceline.el ends here diff --git a/core/defuns/macros-spaceline.el b/core/defuns/macros-spaceline.el deleted file mode 100644 index cb6ffe867..000000000 --- a/core/defuns/macros-spaceline.el +++ /dev/null @@ -1,17 +0,0 @@ -;;; defuns-spaceline.el - -;;;###autoload -(defmacro def-version-cmd! (modes command) - "Define a COMMAND for MODE that will set `doom--env-command' when that mode is -activated, which should return the version number of the current environment. It is used -by `doom|spaceline-env-update' to display a version number in the modeline. For instance: - - (def-version-cmd! ruby-mode \"ruby --version | cut -d' ' -f2\") - -This will display the ruby version in the modeline in ruby-mode buffers. It is cached the -first time." - (add-hook! (focus-in find-file) 'doom|spaceline-env-update) - `(add-hook! ,modes (setq doom--env-command ,command))) - -(provide 'defuns-spaceline) -;;; defuns-spaceline.el ends here