[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/auto-dim-other-buffers 475321c845 35/82: Refactor `adob--d
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/auto-dim-other-buffers 475321c845 35/82: Refactor `adob--dim-buffer' to check `dim' only once |
Date: |
Mon, 12 Dec 2022 20:58:41 -0500 (EST) |
branch: elpa/auto-dim-other-buffers
commit 475321c845fa1da25c92b651cbfb94b6f59a94f1
Author: Michal Nazarewicz <mina86@mina86.com>
Commit: Michal Nazarewicz <mina86@mina86.com>
Refactor `adob--dim-buffer' to check `dim' only once
Instead of having two top-level `when' statements first checking
for “(and (not dim) …)” and the second one for “dim”, use an `if'
checking for “dim” with a nested `when' checking for “…”.
Also, after removing relative face remap, set the
`adob--face-map-remapping' variable to nil.
---
auto-dim-other-buffers.el | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/auto-dim-other-buffers.el b/auto-dim-other-buffers.el
index 1df1bfb741..d29b567e71 100644
--- a/auto-dim-other-buffers.el
+++ b/auto-dim-other-buffers.el
@@ -8,7 +8,7 @@
;; Michal Nazarewicz <mina86@mina86.com>
;; Maintainer: Michal Nazarewicz <mina86@mina86.com>
;; URL: https://github.com/mina86/auto-dim-other-buffers.el
-;; Version: 1.6
+;; Version: 1.6.1
;; This file is not part of GNU Emacs.
@@ -73,11 +73,12 @@ Currently only mini buffer and echo areas are ignored."
(defun adob--dim-buffer (dim)
"Dim (if DIM is non-nil) or undim (otherwise) current buffer."
- (when (and (not dim) adob--face-mode-remapping)
- (face-remap-remove-relative adob--face-mode-remapping))
- (when dim
- (setq adob--face-mode-remapping
- (face-remap-add-relative 'default 'auto-dim-other-buffers-face)))
+ (if dim
+ (setq adob--face-mode-remapping
+ (face-remap-add-relative 'default 'auto-dim-other-buffers-face))
+ (when adob--face-mode-remapping
+ (face-remap-remove-relative adob--face-mode-remapping)
+ (setq adob--face-mode-remapping)))
(force-window-update (current-buffer)))
(defun adob--pre-command-hook ()
- [nongnu] elpa/auto-dim-other-buffers cedb4c4895 47/82: Use ‘buffer-list-update-hook’ instead of ‘post-command-hook’, (continued)
- [nongnu] elpa/auto-dim-other-buffers cedb4c4895 47/82: Use ‘buffer-list-update-hook’ instead of ‘post-command-hook’, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 44b8965cff 32/82: Specify the license, GPL-3.0+ is used., ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 4cc1e1bb08 55/82: Add version of the dim face for light background, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 8d7ef78b4a 65/82: Prefer ‘after-focus-change-function’, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers af8eec9ec2 62/82: Prefer ‘window-buffer’ to ‘current-buffer’, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 4d6e644340 03/82: customizable face, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers d2039c43af 08/82: upgrade the version based on how efficient it is now :D, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 5c793ea235 14/82: better readme, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 0bf0800bb8 07/82: dont try to set face on dead buffers, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers d4f5508b4e 30/82: Bumped version to 1.5 and updated docstrings and comments., ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 475321c845 35/82: Refactor `adob--dim-buffer' to check `dim' only once,
ELPA Syncer <=
- [nongnu] elpa/auto-dim-other-buffers b797afadb4 44/82: s/it’s/its/, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 31c13e7ed8 45/82: Use ‘window-buffer’ instead of ‘current-buffer’, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 90f6a6f0fb 49/82: Bump Version in comment, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 53652211c1 53/82: Add MELPA badge to README, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers bc36211be2 63/82: Dim buffers appearing in non-selected windows, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 69d369e884 75/82: Fix minor typos and small refactor making use of ‘dolist`, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers e20bc722d6 02/82: that didnt help..., ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 244c979b67 25/82: after-change-major-mode-hook on next-error-hook, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 37085cf479 28/82: Consistently use “buffers” in function names, not “windows”., ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 2424476114 18/82: fix some stuff, ELPA Syncer, 2022/12/12