[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/golden-ratio ac9bcedc63 81/95: Reenable improvements remov
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/golden-ratio ac9bcedc63 81/95: Reenable improvements removed by error when reverting last PR. |
Date: |
Thu, 7 Sep 2023 22:02:15 -0400 (EDT) |
branch: elpa/golden-ratio
commit ac9bcedc63d44433315f2726d6f1b66125d5a3e2
Author: Thierry Volpiatto <thierry.volpiatto@gmail.com>
Commit: Thierry Volpiatto <thierry.volpiatto@gmail.com>
Reenable improvements removed by error when reverting last PR.
* golden-ratio.el: Reenable improvements to golden-ratio-exclude-modes.
---
golden-ratio.el | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/golden-ratio.el b/golden-ratio.el
index d5a6b58d9c..d32d73de92 100644
--- a/golden-ratio.el
+++ b/golden-ratio.el
@@ -26,12 +26,12 @@
;; Major modes that are exempt from being resized. An example of this
;; for users of Org-mode might be:
-;; ("calendar-mode")
+;; ("calendar-mode") or (calendar-mode)
(defcustom golden-ratio-exclude-modes nil
- "An array of strings naming major modes.
+ "A list of symbols or strings naming major modes.
Switching to a buffer whose major mode is a member of this list
will not cause the window to be resized to the golden ratio."
- :type '(repeat string)
+ :type '(repeat (choice symbol string))
:group 'golden-ratio)
;; Buffer names that are exempt from being resized. An example of this
@@ -120,6 +120,12 @@ will not cause the window to be resized to the golden
ratio."
(when (window-resizable-p (selected-window) ncol t)
(enlarge-window ncol t)))))
+(defun golden-ratio-exclude-major-mode-p ()
+ "Returns non-nil if `major-mode' should not use golden-ratio."
+ (or (memq major-mode golden-ratio-exclude-modes)
+ (member (symbol-name major-mode)
+ golden-ratio-exclude-modes)))
+
;;;###autoload
(defun golden-ratio ()
"Resizes current window to the golden-ratio's size specs."
@@ -127,8 +133,7 @@ will not cause the window to be resized to the golden
ratio."
(unless (or (not golden-ratio-mode)
(window-minibuffer-p)
(one-window-p)
- (member (symbol-name major-mode)
- golden-ratio-exclude-modes)
+ (golden-ratio-exclude-major-mode-p)
(member (buffer-name)
golden-ratio-exclude-buffer-names)
(and golden-ratio-inhibit-functions
- [nongnu] elpa/golden-ratio 6173b7c416 64/95: Prevent recenter error in post-command-hook for emacs-25., (continued)
- [nongnu] elpa/golden-ratio 6173b7c416 64/95: Prevent recenter error in post-command-hook for emacs-25., ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio 64ceb4f0c8 68/95: Added widescreens header to readme., ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio c506ddc04a 66/95: Added explanation of golden-ratio-adjust., ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio b343baac28 69/95: Added automatic scaling of width according to frame size., ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio d5413c832b 75/95: Fix types in golden-ratio-exclude-modes., ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio e47c29f87e 78/95: Trigger after split-window as well, ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio f7bee8e221 65/95: Added width adjustment to adjust for very wide frames., ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio 76f5307ad0 72/95: Merge pull request #43 from EricGebhart/master, ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio 0287ac76fd 76/95: Simplify `golden-ratio-mode', ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio 7593ba59b3 79/95: Merge pull request #48 from abo-abo/master, ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio ac9bcedc63 81/95: Reenable improvements removed by error when reverting last PR.,
ELPA Syncer <=
- [nongnu] elpa/golden-ratio 5e5b6c805b 85/95: Call window-configuration-change-hook only once, after the golden-ratio command., ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio c5e916d238 86/95: Add fixed width feature, ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio f5807212d3 88/95: Merge pull request #81 from wictory/pr_20190406, ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio 1325ecac07 92/95: support minimal change, ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio 656117e490 93/95: change default minimal change to 1, ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio bf0035fd6a 95/95: Merge pull request #89 from skangas/nongnu-elpa-fixes, ELPA Syncer, 2023/09/07