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

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

[elpa] externals/bufferlo c164b26a64 36/37: Compatibility improvements


From: ELPA Syncer
Subject: [elpa] externals/bufferlo c164b26a64 36/37: Compatibility improvements
Date: Sun, 5 Nov 2023 09:57:34 -0500 (EST)

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

    Compatibility improvements
    
    Advice clone-frame and undelete-frame depending on the Emacs version.
---
 bufferlo.el | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/bufferlo.el b/bufferlo.el
index 440e5caca6..483803e12d 100644
--- a/bufferlo.el
+++ b/bufferlo.el
@@ -136,8 +136,10 @@ This is a list of regular expressions that match buffer 
names."
         ;; Duplicate/move tabs
         (advice-add #'tab-bar-select-tab :around #'bufferlo--activate-force)
         ;; Clone & undelete frame
-        (advice-add #'clone-frame :around #'bufferlo--activate-force)
-        (advice-add #'undelete-frame :around #'bufferlo--activate-force)
+        (when (>= emacs-major-version 28)
+          (advice-add #'clone-frame :around #'bufferlo--activate-force))
+        (when (>= emacs-major-version 29)
+          (advice-add #'undelete-frame :around #'bufferlo--activate-force))
         ;; Switch-tab workaround
         (advice-add #'tab-bar-select-tab :around 
#'bufferlo--clear-buffer-lists-activate)
         (advice-add #'tab-bar--tab :after #'bufferlo--clear-buffer-lists))
@@ -156,8 +158,10 @@ This is a list of regular expressions that match buffer 
names."
     ;; Duplicate/move tabs
     (advice-remove #'tab-bar-select-tab #'bufferlo--activate-force)
     ;; Clone & undelete frame
-    (advice-remove #'clone-frame #'bufferlo--activate-force)
-    (advice-remove #'undelete-frame #'bufferlo--activate-force)
+    (when (>= emacs-major-version 28)
+      (advice-remove #'clone-frame #'bufferlo--activate-force))
+    (when (>= emacs-major-version 29)
+      (advice-remove #'undelete-frame #'bufferlo--activate-force))
     ;; Switch-tab workaround
     (advice-remove #'tab-bar-select-tab 
#'bufferlo--clear-buffer-lists-activate)
     (advice-remove #'tab-bar--tab #'bufferlo--clear-buffer-lists)))



reply via email to

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