Remove vestigial spaceline defuns
This commit is contained in:
parent
a2349cf8ff
commit
3b04d2d461
2 changed files with 0 additions and 42 deletions
|
@ -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
|
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue