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

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

[elpa] externals/popper 3212241316 083/102: Fix #29: Error while modifyi


From: ELPA Syncer
Subject: [elpa] externals/popper 3212241316 083/102: Fix #29: Error while modifying mode line. (#30)
Date: Fri, 8 Sep 2023 15:58:55 -0400 (EDT)

branch: externals/popper
commit 3212241316f7da42d2848700dbb23f09f768df4e
Author: Vincent Zhang <seagle0128@gmail.com>
Commit: GitHub <noreply@github.com>

    Fix #29: Error while modifying mode line. (#30)
    
    * Fix #29: Error while modifying mode line.
    
    * Check whether mode-line-format is a list.
    
    * Fix invalid mode-line in calendar.
---
 popper.el | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/popper.el b/popper.el
index 4d48563246..037ca420d3 100644
--- a/popper.el
+++ b/popper.el
@@ -464,13 +464,14 @@ a popup buffer to open."
 
 (defun popper--modified-mode-line ()
   "Return modified mode-line string."
-  (when popper-mode-line
-    (if (member popper-mode-line mode-line-format)
-        mode-line-format
-      (append (cl-subseq (default-value 'mode-line-format) 0 
popper-mode-line-position)
-              (list popper-mode-line
-                    (nthcdr popper-mode-line-position
-                            (default-value 'mode-line-format)))))))
+  (if (and popper-mode-line (consp mode-line-format))
+      (if (member popper-mode-line mode-line-format)
+          mode-line-format
+        (append (cl-subseq (default-value 'mode-line-format) 0 
popper-mode-line-position)
+                (list popper-mode-line
+                      (nthcdr popper-mode-line-position
+                              (default-value 'mode-line-format)))))
+    mode-line-format))
 
 (defun popper--restore-mode-lines (win-buf-alist)
   "Restore the default value of `mode-line-format'.
@@ -647,7 +648,7 @@ If BUFFER is not specified act on the current buffer 
instead."
                  ('mode (cl-pushnew (car elm) popper--suppressed-modes))
                  ('pred (cl-pushnew (car elm) popper--suppressed-predicates))))
              (popper--insert-type (car elm)))))
-  
+
   (dolist (entry popper-reference-buffers nil)
     (popper--insert-type entry)))
 



reply via email to

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