mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-27 11:09:52 +00:00
Fix warnings.
This commit is contained in:
parent
e279915b51
commit
776d8ed923
1 changed files with 27 additions and 10 deletions
|
@ -103,6 +103,21 @@ Given ~/Projects/FOSS/emacs/lisp/comint.el
|
||||||
(defvar text-scale-mode-amount)
|
(defvar text-scale-mode-amount)
|
||||||
(defvar winum-auto-setup-mode-line)
|
(defvar winum-auto-setup-mode-line)
|
||||||
|
|
||||||
|
(declare-function anzu--reset-status 'anzu)
|
||||||
|
(declare-function anzu--where-is-here 'anzu)
|
||||||
|
(declare-function eldoc-in-minibuffer-mode 'eldoc-eval)
|
||||||
|
(declare-function evil-delimited-arguments 'evil-common)
|
||||||
|
(declare-function eyebrowse--get 'eyebrowse)
|
||||||
|
(declare-function face-remap-remove-relative 'face-remap)
|
||||||
|
(declare-function flycheck-count-errors 'flycheck)
|
||||||
|
(declare-function iedit-find-current-occurrence-overlay 'iedit-lib)
|
||||||
|
(declare-function iedit-prev-occurrence 'iedit-lib)
|
||||||
|
(declare-function image-get-display-property 'image-mode)
|
||||||
|
(declare-function magit-toplevel 'magit-git)
|
||||||
|
(declare-function window-numbering-clear-mode-line 'window-numbering)
|
||||||
|
(declare-function window-numbering-get-number-string 'window-numbering)
|
||||||
|
(declare-function window-numbering-install-mode-line 'window-numbering)
|
||||||
|
(declare-function winum-get-number-string 'winum)
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;; Custom faces
|
;; Custom faces
|
||||||
|
@ -380,10 +395,8 @@ If STRICT-P, return nil if no project was found, otherwise return
|
||||||
(sit-for eldoc-show-in-mode-line-delay))))
|
(sit-for eldoc-show-in-mode-line-delay))))
|
||||||
(setq eldoc-in-minibuffer-show-fn #'doom-modeline--show-eldoc)
|
(setq eldoc-in-minibuffer-show-fn #'doom-modeline--show-eldoc)
|
||||||
|
|
||||||
(declare-function eldoc-in-minibuffer-mode 'eldoc-eval)
|
|
||||||
(eldoc-in-minibuffer-mode 1)
|
(eldoc-in-minibuffer-mode 1)
|
||||||
|
|
||||||
|
|
||||||
;; anzu and evil-anzu expose current/total state that can be displayed in the
|
;; anzu and evil-anzu expose current/total state that can be displayed in the
|
||||||
;; mode-line.
|
;; mode-line.
|
||||||
(when (featurep 'evil-anzu)
|
(when (featurep 'evil-anzu)
|
||||||
|
@ -391,12 +404,14 @@ If STRICT-P, return nil if no project was found, otherwise return
|
||||||
anzu-minimum-input-length 1
|
anzu-minimum-input-length 1
|
||||||
anzu-search-threshold 250)
|
anzu-search-threshold 250)
|
||||||
|
|
||||||
(defun doom-modeline-fix-anzu-count (positions here)
|
(eval-when-compile
|
||||||
(cl-loop for (start . end) in positions
|
(defun doom-modeline-fix-anzu-count (positions here)
|
||||||
collect t into before
|
(cl-loop for (start . end) in positions
|
||||||
when (and (>= here start) (<= here end))
|
collect t into before
|
||||||
return (length before)
|
when (and (>= here start) (<= here end))
|
||||||
finally return 0))
|
return (length before)
|
||||||
|
finally return 0)))
|
||||||
|
|
||||||
(advice-add #'anzu--where-is-here :override #'doom-modeline-fix-anzu-count)
|
(advice-add #'anzu--where-is-here :override #'doom-modeline-fix-anzu-count)
|
||||||
|
|
||||||
;; Avoid anzu conflicts across buffers
|
;; Avoid anzu conflicts across buffers
|
||||||
|
@ -734,7 +749,6 @@ directory, the file name, and its state (modified, read-only or non-existent)."
|
||||||
(add-hook 'after-save-hook #'doom-modeline--update-vcs)
|
(add-hook 'after-save-hook #'doom-modeline--update-vcs)
|
||||||
(add-hook 'find-file-hook #'doom-modeline--update-vcs t)
|
(add-hook 'find-file-hook #'doom-modeline--update-vcs t)
|
||||||
|
|
||||||
(declare-function magit-toplevel "magit-git")
|
|
||||||
(defun doom-modeline-magit-post-refresh ()
|
(defun doom-modeline-magit-post-refresh ()
|
||||||
"Update vcs state in mode-line after refreshing in magit."
|
"Update vcs state in mode-line after refreshing in magit."
|
||||||
(dolist (buf (buffer-list))
|
(dolist (buf (buffer-list))
|
||||||
|
@ -837,6 +851,7 @@ lines are selected, or the NxM dimensions of a block selection."
|
||||||
(format " %dW" (count-words beg end)))))
|
(format " %dW" (count-words beg end)))))
|
||||||
'face 'doom-modeline-highlight))))
|
'face 'doom-modeline-highlight))))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;; matches (anzu, evil-substitute, iedit, macro)
|
;; matches (anzu, evil-substitute, iedit, macro)
|
||||||
;;
|
;;
|
||||||
|
@ -994,11 +1009,11 @@ with `evil-ex-substitute', and/or 4. The number of active `iedit' regions."
|
||||||
'doom-modeline-inactive-bar))
|
'doom-modeline-inactive-bar))
|
||||||
"")))
|
"")))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;; workspace-number
|
;; workspace-number
|
||||||
;;
|
;;
|
||||||
|
|
||||||
(declare-function eyebrowse--get 'eyebrowse)
|
|
||||||
(doom-modeline-def-segment workspace-number
|
(doom-modeline-def-segment workspace-number
|
||||||
"The current workspace name or number. Requires `eyebrowse-mode' to be
|
"The current workspace name or number. Requires `eyebrowse-mode' to be
|
||||||
enabled."
|
enabled."
|
||||||
|
@ -1012,6 +1027,7 @@ enabled."
|
||||||
(propertize (format "%s " str) 'face 'doom-modeline-eyebrowse))
|
(propertize (format "%s " str) 'face 'doom-modeline-eyebrowse))
|
||||||
""))
|
""))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;; global
|
;; global
|
||||||
;;
|
;;
|
||||||
|
@ -1021,6 +1037,7 @@ enabled."
|
||||||
(when (< 0 (length global-mode-string))
|
(when (< 0 (length global-mode-string))
|
||||||
'(" " global-mode-string " ")))
|
'(" " global-mode-string " ")))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;; position
|
;; position
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in a new issue