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

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

[elpa] externals/bufferlo c000ff8398 09/37: Add bufferlo-non-local-buffe


From: ELPA Syncer
Subject: [elpa] externals/bufferlo c000ff8398 09/37: Add bufferlo-non-local-buffer-p
Date: Sun, 5 Nov 2023 09:57:32 -0500 (EST)

branch: externals/bufferlo
commit c000ff83982f3b65a749c3d6fffd637910a6ba0c
Author: Florian Rommel <mail@florommel.de>
Commit: Florian Rommel <mail@florommel.de>

    Add bufferlo-non-local-buffer-p
---
 bufferlo.el | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/bufferlo.el b/bufferlo.el
index d31f3b8714..85bb18087a 100644
--- a/bufferlo.el
+++ b/bufferlo.el
@@ -173,9 +173,15 @@ This is a list of regular expressions that match buffer 
names."
     (advice-remove #'tab-bar-select-tab #'bufferlo--activate)
     (advice-remove #'tab-bar--tab #'bufferlo--activate)))
 
-(defun bufferlo-local-buffer-p (buffer)
-  "Return whether BUFFER is in the list of local buffers."
-  (memq buffer (bufferlo--current-buffers nil)))
+(defun bufferlo-local-buffer-p (buffer &optional frame)
+  "Return whether BUFFER is in the list of local buffers.
+If FRAME is non-nil check if the buffer is local to the given frame."
+  (memq buffer (bufferlo--current-buffers frame)))
+
+(defun bufferlo-non-local-buffer-p (buffer &optional frame)
+  "Return whether BUFFER is not in the list of local buffers.
+If FRAME is non-nil check if the buffer is not local to the given frame."
+  (not (bufferlo-local-buffer-p buffer frame)))
 
 (defun bufferlo--set-buffer-predicate (frame)
   "Set the buffer predicate of FRAME to `bufferlo-local-buffer-p'."



reply via email to

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