emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/anzu 1afa7d7b0f 013/288: Add flag whether anzu.el cons sea


From: ELPA Syncer
Subject: [nongnu] elpa/anzu 1afa7d7b0f 013/288: Add flag whether anzu.el cons search info to mode-line(#4)
Date: Thu, 6 Jan 2022 03:58:35 -0500 (EST)

branch: elpa/anzu
commit 1afa7d7b0f15e2d20c88fc21d15b3f0d44804bef
Author: Syohei YOSHIDA <syohex@gmail.com>
Commit: Syohei YOSHIDA <syohex@gmail.com>

    Add flag whether anzu.el cons search info to mode-line(#4)
---
 anzu.el | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/anzu.el b/anzu.el
index 3ba212522b..0ed9ae250d 100644
--- a/anzu.el
+++ b/anzu.el
@@ -46,6 +46,11 @@
   :type 'string
   :group 'anzu)
 
+(defcustom anzu-cons-mode-line-p t
+  "Set nil if you use your own setting"
+  :type 'boolean
+  :group 'anzu)
+
 (defcustom anzu-use-migemo nil
   "Flag of using migemo"
   :type 'boolean
@@ -105,12 +110,12 @@
        (equal (car mode-line-format) '(:eval (anzu--update-mode-line)))))
 
 (defun anzu--cons-mode-line ()
-  (unless (anzu--mode-line-not-set-p)
+  (when (and anzu-cons-mode-line-p (not (anzu--mode-line-not-set-p)))
     (setq mode-line-format (cons '(:eval (anzu--update-mode-line))
                                  mode-line-format))))
 
 (defun anzu--reset-mode-line ()
-  (when (anzu--mode-line-not-set-p)
+  (when (and anzu-cons-mode-line-p (anzu--mode-line-not-set-p))
     (setq mode-line-format (cdr mode-line-format))))
 
 (defun anzu--update-mode-line-default (here total)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]