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

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

[elpa] externals/calibre bc26df0b48 36/76: Set tabulated-list-format in


From: ELPA Syncer
Subject: [elpa] externals/calibre bc26df0b48 36/76: Set tabulated-list-format in the correct buffer
Date: Thu, 18 May 2023 09:57:44 -0400 (EDT)

branch: externals/calibre
commit bc26df0b48ca918d4cfecc74b65b5d36a91be5e4
Author: Kjartan Óli Ágústsson <kjartanoli@disroot.org>
Commit: Kjartan Óli Ágústsson <kjartanoli@disroot.org>

    Set tabulated-list-format in the correct buffer
    
    * calibre-db.el (calibre-library--set-header): Get the Library buffer,
    and only set tabulated-list-format if it exists, and then in that
    buffer.
---
 calibre-db.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/calibre-db.el b/calibre-db.el
index 9d43190d5c..5de3e6a3ee 100644
--- a/calibre-db.el
+++ b/calibre-db.el
@@ -186,7 +186,10 @@ column should have."
 
 (defun calibre-library--set-header ()
   "Set the header of the Library buffer."
-  (setf tabulated-list-format (calibre-library--header-format)))
+  (let ((buffer (get-buffer calibre-library-buffer)))
+    (when buffer
+      (with-current-buffer buffer
+        (setf tabulated-list-format (calibre-library--header-format))))))
 
 (defun calibre-library--header-format ()
   "Create the header for the Library buffer.



reply via email to

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