Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable default helm modeline functions for helm-ag and helm-fd #585

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion doom-modeline.el
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ If DEFAULT is non-nil, set the default mode-line for all buffers."
;; Suppress warnings
(defvar 2C-mode-line-format)
(defvar helm-ag-show-status-function)
(defvar helm-fd-mode-line-function)
(declare-function helm-display-mode-line "ext:helm-core")

(defvar doom-modeline-mode-map (make-sparse-keymap))
Expand Down Expand Up @@ -227,7 +228,8 @@ If DEFAULT is non-nil, set the default mode-line for all buffers."

;; Special handles
(advice-add #'helm-display-mode-line :after #'doom-modeline-set-helm-modeline)
(setq helm-ag-show-status-function #'doom-modeline-set-helm-modeline))
(setq helm-ag-show-status-function nil
helm-fd-mode-line-function nil))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any update?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually there is nothing more to do here. For helm-ag and helm-fd this is the best solution as setting those functions to nil prevents the modeline from being overwritten (in the code they check whether this is nil).

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean when disabling doom-modeline-mode, all vars should be restore to the original values.

(progn
;; Restore mode-line
(let ((original-format (doom-modeline--original-value 'mode-line-format)))
Expand Down