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

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

[nongnu] elpa/golden-ratio 72b028808b 83/95: Allow buffer exclusion with


From: ELPA Syncer
Subject: [nongnu] elpa/golden-ratio 72b028808b 83/95: Allow buffer exclusion with regular expressions (#58).
Date: Thu, 7 Sep 2023 22:02:15 -0400 (EDT)

branch: elpa/golden-ratio
commit 72b028808b41d23fa3f7e8c0d23d2c475e7b46ae
Author: Thierry Volpiatto <thierry.volpiatto@gmail.com>
Commit: Thierry Volpiatto <thierry.volpiatto@gmail.com>

    Allow buffer exclusion with regular expressions (#58).
    
    * golden-ratio.el (golden-ratio-exclude-buffer-regexp): New user var.
    (golden-ratio): Use it.
---
 golden-ratio.el | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/golden-ratio.el b/golden-ratio.el
index 58190b7f83..b16441a8c4 100644
--- a/golden-ratio.el
+++ b/golden-ratio.el
@@ -80,6 +80,12 @@ will not cause the window to be resized to the golden ratio."
   :group 'golden-ratio
   :type 'boolean)
 
+(defcustom golden-ratio-exclude-buffer-regexp nil
+  "A list of regexp's used to match buffer names.
+Switching to a buffer whose name matches one of these regexps
+will prevent the window to be resized to the golden ratio."
+  :type '(repeat string)
+  :group 'golden-ratio)
 
 ;;; Compatibility
 ;;
@@ -136,6 +142,9 @@ will not cause the window to be resized to the golden 
ratio."
               (golden-ratio-exclude-major-mode-p)
               (member (buffer-name)
                       golden-ratio-exclude-buffer-names)
+              (and golden-ratio-exclude-buffer-regexp
+                (loop for r in golden-ratio-exclude-buffer-regexp
+                         thereis (string-match r (buffer-name))))
               (and golden-ratio-inhibit-functions
                    (loop for fun in golden-ratio-inhibit-functions
                          thereis (funcall fun))))



reply via email to

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