branch: elpa/anzu
commit a894a0111039a410bb37eb450f775ff7ac9c8f10
Author: Syohei YOSHIDA <[email protected]>
Commit: Syohei YOSHIDA <[email protected]>
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