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

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

[nongnu] elpa/auto-dim-other-buffers 853523a854 50/82: Don't dim last bu


From: ELPA Syncer
Subject: [nongnu] elpa/auto-dim-other-buffers 853523a854 50/82: Don't dim last buffer when switching to minibuffer or echo area.
Date: Mon, 12 Dec 2022 20:58:43 -0500 (EST)

branch: elpa/auto-dim-other-buffers
commit 853523a85431e4b64ada0e58b242fa9307435c62
Author: William Bert <william@spanishdict.com>
Commit: William Bert <william@spanishdict.com>

    Don't dim last buffer when switching to minibuffer or echo area.
---
 auto-dim-other-buffers.el | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/auto-dim-other-buffers.el b/auto-dim-other-buffers.el
index 413e852ceb..540bd75330 100644
--- a/auto-dim-other-buffers.el
+++ b/auto-dim-other-buffers.el
@@ -63,6 +63,11 @@
   :type 'boolean
   :group 'auto-dim-other-buffers)
 
+(defcustom auto-dim-other-buffers-dim-on-switch-to-minibuffer t
+  "Whether to dim last buffer when switching to minibuffer or echo area."
+  :type 'boolean
+  :group 'auto-dim-other-buffers)
+
 (defvar adob--last-buffer nil
   "Selected buffer before command finished.")
 
@@ -98,6 +103,12 @@ Currently only mini buffer and echo areas are ignored."
       ;; dimmed. if it's just killed, don't try to set its face.
       (and (buffer-live-p adob--last-buffer)
            (not (adob--ignore-buffer adob--last-buffer))
+           ;; By default, dim last buffer on switch to any other buffer. But if
+           ;; option is nil, then don't dim last buffer on switch to minibuffer
+           ;; or echo area.
+           (or auto-dim-other-buffers-dim-on-switch-to-minibuffer
+               (not (or (minibufferp (current-buffer))
+                        (string-match "^ \\*Echo Area" (buffer-name 
(current-buffer))))))
            (with-current-buffer adob--last-buffer
              (adob--dim-buffer t)))
       ;; now, restore the selected buffer, and undim it.



reply via email to

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