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

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

[elpa] externals/nano-modeline 9ca47db 16/24: Merge remote-tracking bran


From: ELPA Syncer
Subject: [elpa] externals/nano-modeline 9ca47db 16/24: Merge remote-tracking branch 'origin/master'
Date: Wed, 6 Oct 2021 17:57:35 -0400 (EDT)

branch: externals/nano-modeline
commit 9ca47dbe40d61e04a60ed483507d8e76e226f4e3
Merge: ac0b497 9d5290a
Author: Nicolas P. Rougier <Nicolas.Rougier@inria.fr>
Commit: Nicolas P. Rougier <Nicolas.Rougier@inria.fr>

    Merge remote-tracking branch 'origin/master'
---
 nano-modeline.el | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/nano-modeline.el b/nano-modeline.el
index 606565f..79c6a99 100644
--- a/nano-modeline.el
+++ b/nano-modeline.el
@@ -223,6 +223,15 @@ Modeline is composed as:
                            'nano-modeline-inactive-secondary)))))
 
 ;; ---------------------------------------------------------------------
+(with-eval-after-load 'mu4e
+  (if (string> mu4e-mu-version "1.6.5")
+      (defun nano-modeline-mu4e-server-props ()
+        "Encapsulates the call to the variable mu4e-/~server-props depending 
on the version mu4e."
+        mu4e--server-props)
+    (defun nano-modeline-mu4e-server-props ()
+      "Encapsulates the call to the variable mu4e-/~server-props depending on 
the version mu4e."
+      mu4e~server-props)))
+
 (defun nano-modeline-mu4e-dashboard-mode-p ()
   (bound-and-true-p mu4e-dashboard-mode))
 
@@ -230,7 +239,7 @@ Modeline is composed as:
   (nano-modeline-compose (nano-modeline-status)
                          "Mail"
                          (nano-modeline-mu4e-context)
-                         (format "%d messages" (plist-get mu4e~server-props 
:doccount))))
+                         (format "%d messages" (plist-get 
(nano-modeline-mu4e-server-props) :doccount))))
 
 ;; ---------------------------------------------------------------------
 ;; since the EIN library itself is constantly re-rendering the notebook, and 
thus
@@ -409,7 +418,7 @@ Modeline is composed as:
 
 (defun nano-modeline-mu4e-headers-mode ()
   (nano-modeline-compose (nano-modeline-status)
-                         (mu4e~quote-for-modeline mu4e~headers-last-query)
+                         (mu4e-quote-for-modeline (mu4e-last-query))
                          ""
                          (format "[%s]"
                          (mu4e~quote-for-modeline
@@ -417,6 +426,10 @@ Modeline is composed as:
                          ))
 
 (with-eval-after-load 'mu4e
+  (unless (fboundp 'mu4e-last-query)
+    (defun mu4e-last-query ()
+      "Get the most recent query or nil if there is none."
+      mu4e~headers-last-query))
   (defun mu4e~header-line-format () (nano-modeline)))
 
 ;; ---------------------------------------------------------------------



reply via email to

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