2015-10-01 03:40:09 -04:00
|
|
|
;;; defuns-spaceline.el
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun narf|spaceline-env-update ()
|
|
|
|
(when narf--env-command
|
2015-12-11 16:51:04 -05:00
|
|
|
(let ((default-directory (narf/project-root)))
|
|
|
|
(let ((s (shell-command-to-string narf--env-command)))
|
|
|
|
(setq narf--env-version (if (string-match "[ \t\n\r]+\\'" s)
|
|
|
|
(replace-match "" t t s)
|
|
|
|
s))))))
|
2015-10-01 03:40:09 -04:00
|
|
|
|
2016-05-13 00:26:36 -04:00
|
|
|
;;;###autoload
|
|
|
|
(defun narf/-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))))))
|
|
|
|
|
2015-10-01 03:40:09 -04:00
|
|
|
(provide 'defuns-spaceline)
|
|
|
|
;;; defuns-spaceline.el ends here
|