mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-27 11:09:52 +00:00
Fix: void variables error in Emacs 25 with terminal.
This commit is contained in:
parent
1e5a5b6d7b
commit
8e16fc8380
1 changed files with 36 additions and 31 deletions
|
@ -722,10 +722,12 @@ mouse-2: Show help for minor mode")
|
||||||
(concat
|
(concat
|
||||||
(if flycheck-current-errors
|
(if flycheck-current-errors
|
||||||
(let-alist (flycheck-count-errors flycheck-current-errors)
|
(let-alist (flycheck-count-errors flycheck-current-errors)
|
||||||
(format "error: %d, warning: %d, info: %d\n" (or .error 0) (or .warning 0) (or .info 0))))
|
(format "error: %d, warning: %d, info: %d\n"
|
||||||
|
(or .error 0) (or .warning 0) (or .info 0))))
|
||||||
"mouse-1: Show all errors
|
"mouse-1: Show all errors
|
||||||
mouse-3: Next error
|
mouse-3: Next error"
|
||||||
wheel-up/wheel-down: Previous/next error"))
|
(if (featurep 'mwheel)
|
||||||
|
"\nwheel-up/wheel-down: Previous/next error")))
|
||||||
('running "Running...")
|
('running "Running...")
|
||||||
('no-checker "No Checker")
|
('no-checker "No Checker")
|
||||||
('errored "Error")
|
('errored "Error")
|
||||||
|
@ -737,6 +739,7 @@ wheel-up/wheel-down: Previous/next error"))
|
||||||
#'flycheck-list-errors)
|
#'flycheck-list-errors)
|
||||||
(define-key map [mode-line mouse-3]
|
(define-key map [mode-line mouse-3]
|
||||||
#'flycheck-next-error)
|
#'flycheck-next-error)
|
||||||
|
(when (featurep 'mwheel)
|
||||||
(define-key map (vector 'mode-line
|
(define-key map (vector 'mode-line
|
||||||
mouse-wheel-down-event)
|
mouse-wheel-down-event)
|
||||||
(lambda (event)
|
(lambda (event)
|
||||||
|
@ -749,7 +752,7 @@ wheel-up/wheel-down: Previous/next error"))
|
||||||
(interactive "e")
|
(interactive "e")
|
||||||
(with-selected-window (posn-window (event-start event))
|
(with-selected-window (posn-window (event-start event))
|
||||||
(flycheck-next-error 1))))
|
(flycheck-next-error 1))))
|
||||||
map)))))
|
map))))))
|
||||||
(add-hook 'flycheck-status-changed-functions #'doom-modeline-update-flycheck-text)
|
(add-hook 'flycheck-status-changed-functions #'doom-modeline-update-flycheck-text)
|
||||||
(add-hook 'flycheck-mode-hook #'doom-modeline-update-flycheck-text)
|
(add-hook 'flycheck-mode-hook #'doom-modeline-update-flycheck-text)
|
||||||
|
|
||||||
|
@ -880,13 +883,15 @@ mouse-2: Show help for minor mode"
|
||||||
((null known) "No Checker")
|
((null known) "No Checker")
|
||||||
(all-disabled "All Checkers Disabled")
|
(all-disabled "All Checkers Disabled")
|
||||||
(t (format "error: %d, warning: %d, note: %d
|
(t (format "error: %d, warning: %d, note: %d
|
||||||
mouse-1: List all problems
|
mouse-1: List all problems%s"
|
||||||
wheel-up/wheel-down: Previous/next problem"
|
(if (featurep 'mwheel)
|
||||||
|
"\nwheel-up/wheel-down: Previous/next problem")
|
||||||
.error .warning .note)))
|
.error .warning .note)))
|
||||||
'mouse-face 'mode-line-highlight
|
'mouse-face 'mode-line-highlight
|
||||||
'local-map (let ((map (make-sparse-keymap)))
|
'local-map (let ((map (make-sparse-keymap)))
|
||||||
(define-key map [mode-line mouse-1]
|
(define-key map [mode-line mouse-1]
|
||||||
#'flymake-show-diagnostics-buffer)
|
#'flymake-show-diagnostics-buffer)
|
||||||
|
(when (featurep 'mwheel)
|
||||||
(define-key map (vector 'mode-line
|
(define-key map (vector 'mode-line
|
||||||
mouse-wheel-down-event)
|
mouse-wheel-down-event)
|
||||||
(lambda (event)
|
(lambda (event)
|
||||||
|
@ -899,7 +904,7 @@ wheel-up/wheel-down: Previous/next problem"
|
||||||
(interactive "e")
|
(interactive "e")
|
||||||
(with-selected-window (posn-window (event-start event))
|
(with-selected-window (posn-window (event-start event))
|
||||||
(flymake-goto-next-error 1 nil t))))
|
(flymake-goto-next-error 1 nil t))))
|
||||||
map))))))
|
map)))))))
|
||||||
(advice-add #'flymake--handle-report :after #'doom-modeline-update-flymake-text)
|
(advice-add #'flymake--handle-report :after #'doom-modeline-update-flymake-text)
|
||||||
|
|
||||||
(doom-modeline-def-segment checker
|
(doom-modeline-def-segment checker
|
||||||
|
|
Loading…
Reference in a new issue