mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-23 19:19:50 +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,19 +739,20 @@ 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)
|
||||||
(define-key map (vector 'mode-line
|
(when (featurep 'mwheel)
|
||||||
mouse-wheel-down-event)
|
(define-key map (vector 'mode-line
|
||||||
(lambda (event)
|
mouse-wheel-down-event)
|
||||||
(interactive "e")
|
(lambda (event)
|
||||||
(with-selected-window (posn-window (event-start event))
|
(interactive "e")
|
||||||
(flycheck-previous-error 1))))
|
(with-selected-window (posn-window (event-start event))
|
||||||
(define-key map (vector 'mode-line
|
(flycheck-previous-error 1))))
|
||||||
mouse-wheel-up-event)
|
(define-key map (vector 'mode-line
|
||||||
(lambda (event)
|
mouse-wheel-up-event)
|
||||||
(interactive "e")
|
(lambda (event)
|
||||||
(with-selected-window (posn-window (event-start event))
|
(interactive "e")
|
||||||
(flycheck-next-error 1))))
|
(with-selected-window (posn-window (event-start event))
|
||||||
map)))))
|
(flycheck-next-error 1))))
|
||||||
|
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,26 +883,28 @@ 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)
|
||||||
(define-key map (vector 'mode-line
|
(when (featurep 'mwheel)
|
||||||
mouse-wheel-down-event)
|
(define-key map (vector 'mode-line
|
||||||
(lambda (event)
|
mouse-wheel-down-event)
|
||||||
(interactive "e")
|
(lambda (event)
|
||||||
(with-selected-window (posn-window (event-start event))
|
(interactive "e")
|
||||||
(flymake-goto-prev-error 1 nil t))))
|
(with-selected-window (posn-window (event-start event))
|
||||||
(define-key map (vector 'mode-line
|
(flymake-goto-prev-error 1 nil t))))
|
||||||
mouse-wheel-up-event)
|
(define-key map (vector 'mode-line
|
||||||
(lambda (event)
|
mouse-wheel-up-event)
|
||||||
(interactive "e")
|
(lambda (event)
|
||||||
(with-selected-window (posn-window (event-start event))
|
(interactive "e")
|
||||||
(flymake-goto-next-error 1 nil t))))
|
(with-selected-window (posn-window (event-start event))
|
||||||
map))))))
|
(flymake-goto-next-error 1 nil t))))
|
||||||
|
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