[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/auto-dim-other-buffers cedb4c4895 47/82: Use ‘buffer-list
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/auto-dim-other-buffers cedb4c4895 47/82: Use ‘buffer-list-update-hook’ instead of ‘post-command-hook’ |
Date: |
Mon, 12 Dec 2022 20:58:42 -0500 (EST) |
branch: elpa/auto-dim-other-buffers
commit cedb4c48955812f26ab5f22340f9a48e85aa17e7
Author: Michal Nazarewicz <mina86@mina86.com>
Commit: Michal Nazarewicz <mina86@mina86.com>
Use ‘buffer-list-update-hook’ instead of ‘post-command-hook’
In certain cases, ‘post-command-hook’ is called before a buffer
is changed and then doesn’t get called again. This leads to buffer
not being properly undimmed. Change to use ‘buffer-list-update-hook’
which is called on every buffer change.
This fixes https://github.com/mina86/auto-dim-other-buffers.el/issues/12
---
auto-dim-other-buffers.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/auto-dim-other-buffers.el b/auto-dim-other-buffers.el
index 53b202aaff..572977a11f 100644
--- a/auto-dim-other-buffers.el
+++ b/auto-dim-other-buffers.el
@@ -89,7 +89,7 @@ Currently only mini buffer and echo areas are ignored."
t))
(force-window-update (current-buffer)))
-(defun adob--post-command-hook ()
+(defun adob--buffer-list-update-hook ()
"If buffer has changed, dim the last one and undim the new one."
(let ((buf (window-buffer)))
;; if we haven't switched buffers, do nothing
@@ -130,7 +130,7 @@ function."
(defun adob--hooks (callback)
"Add (if CALLBACK is `add-hook') or remove (if `remove-hook') adob hooks."
(dolist (args
- '((post-command-hook adob--post-command-hook)
+ '((buffer-list-update-hook adob--buffer-list-update-hook)
(focus-out-hook adob--focus-out-hook)
(focus-in-hook adob--focus-in-hook)))
(apply callback args)))
- [nongnu] elpa/auto-dim-other-buffers e7fcc5336c 13/82: less ceremonial readme?, (continued)
- [nongnu] elpa/auto-dim-other-buffers e7fcc5336c 13/82: less ceremonial readme?, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 6804fde17b 11/82: screenshot, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers fb7ea24922 26/82: dimming/undimming when gaining/losing app focus, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers e64bdbdb0a 34/82: Use `face-remap-add-relative' to not interfere with `buffer-face-mode', ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 6ebff3681f 46/82: Don’t dim already dimmed buffer, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers e85510688d 19/82: duh, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers c80b367dd0 22/82: Leave echo area alone, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers bea02696f0 21/82: Use save-current-buffer and with-current-buffer, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers a969ff4e0e 16/82: minor mode, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers cfab476572 36/82: Move hooks adding/removing to separate function, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers cedb4c4895 47/82: Use ‘buffer-list-update-hook’ instead of ‘post-command-hook’,
ELPA Syncer <=
- [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, 2022/12/12