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

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

[nongnu] elpa/anzu a894a01110 230/288: Set default mode-line update func


From: ELPA Syncer
Subject: [nongnu] elpa/anzu a894a01110 230/288: Set default mode-line update function
Date: Thu, 6 Jan 2022 03:58:56 -0500 (EST)

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

    Set default mode-line update function
    
    One condition can be removed by this change
---
 anzu.el | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/anzu.el b/anzu.el
index d96c3f4ddb..4f31b3b9b0 100644
--- a/anzu.el
+++ b/anzu.el
@@ -71,7 +71,7 @@
   "Flag of using migemo"
   :type 'boolean)
 
-(defcustom anzu-mode-line-update-function nil
+(defcustom anzu-mode-line-update-function #'anzu--update-mode-line-default
   "Function which return mode-line string"
   :type 'function)
 
@@ -283,9 +283,7 @@
       (propertize status 'face 'anzu-mode-line))))
 
 (defun anzu--update-mode-line ()
-  (let ((update-func (or anzu-mode-line-update-function
-                         'anzu--update-mode-line-default)))
-    (funcall update-func anzu--current-position anzu--total-matched)))
+  (funcall anzu-mode-line-update-function anzu--current-position 
anzu--total-matched))
 
 ;;;###autoload
 (define-minor-mode anzu-mode



reply via email to

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