[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/spacious-padding 8519c50f0f: Make spacious-padding-modi
From: |
ELPA Syncer |
Subject: |
[elpa] externals/spacious-padding 8519c50f0f: Make spacious-padding-modify-frame-parameters actually accept FRAME |
Date: |
Wed, 23 Apr 2025 16:01:19 -0400 (EDT) |
branch: externals/spacious-padding
commit 8519c50f0f7bc36f21856c19534bf80849b70c94
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Make spacious-padding-modify-frame-parameters actually accept FRAME
Looking at the code I had there, this was the original intention.
---
spacious-padding.el | 29 +++++++++++++++--------------
1 file changed, 15 insertions(+), 14 deletions(-)
diff --git a/spacious-padding.el b/spacious-padding.el
index ba584277ab..0f313cf389 100644
--- a/spacious-padding.el
+++ b/spacious-padding.el
@@ -426,25 +426,26 @@ parameter value."
(spacious-padding--define-get-frame-param "right-fringe-width" nil)
(spacious-padding--define-get-frame-param "scroll-bar-width" 8)
-(defun spacious-padding-modify-frame-parameters (&optional reset)
- "Modify all frame parameters to specify spacing.
+(defun spacious-padding-modify-frame-parameters (&optional frame reset)
+ "Modify spacing of all frames or optional FRAME.
With optional RESET argument as non-nil, restore the default
parameter values."
- (modify-all-frames-parameters
- `((internal-border-width . ,(spacious-padding--get-internal-border-width
reset))
- (right-divider-width . ,(spacious-padding--get-right-divider-width reset))
- (left-fringe . ,(or (spacious-padding--get-left-fringe-width reset)
- (spacious-padding--get-fringe-width reset)))
- (right-fringe . ,(or (spacious-padding--get-right-fringe-width reset)
- (spacious-padding--get-fringe-width reset)))
- (scroll-bar-width . ,(spacious-padding--get-scroll-bar-width reset)))))
+ (let ((parameters `((internal-border-width .
,(spacious-padding--get-internal-border-width reset))
+ (right-divider-width .
,(spacious-padding--get-right-divider-width reset))
+ (left-fringe . ,(or
(spacious-padding--get-left-fringe-width reset)
+ (spacious-padding--get-fringe-width
reset)))
+ (right-fringe . ,(or
(spacious-padding--get-right-fringe-width reset)
+ (spacious-padding--get-fringe-width
reset)))
+ (scroll-bar-width .
,(spacious-padding--get-scroll-bar-width reset)))))
+ (if frame
+ (modify-frame-parameters frame parameters)
+ (modify-all-frames-parameters parameters))))
;;;###autoload
(defun spacious-padding-set-parameters-of-frame (frame)
"Set the layout parameters of FRAME and update the faces."
- (with-selected-frame frame
- (spacious-padding-modify-frame-parameters)
- (spacious-padding-set-faces)))
+ (spacious-padding-modify-frame-parameters frame)
+ (spacious-padding-set-faces))
(defun spacious-padding--enable-mode ()
"Enable `spacious-padding-mode'."
@@ -457,7 +458,7 @@ parameter values."
(defun spacious-padding--disable-mode ()
"Disable `spacious-padding-mode'."
- (spacious-padding-modify-frame-parameters :reset)
+ (spacious-padding-modify-frame-parameters nil :reset)
(spacious-padding-unset-invisible-dividers)
(remove-hook 'window-divider-mode-hook #'spacious-padding--enable-mode)
(remove-hook 'enable-theme-functions #'spacious-padding-set-faces)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/spacious-padding 8519c50f0f: Make spacious-padding-modify-frame-parameters actually accept FRAME,
ELPA Syncer <=