[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/auto-dim-other-buffers 2a19931b27 80/82: Introduce ‘auto-
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/auto-dim-other-buffers 2a19931b27 80/82: Introduce ‘auto-dim-other-buffers-hide-face’ for hidden dimmed text |
Date: |
Mon, 12 Dec 2022 20:58:48 -0500 (EST) |
branch: elpa/auto-dim-other-buffers
commit 2a19931b275dc3c70c4bb16a3c60046800ba631a
Author: Michal Nazarewicz <mina86@mina86.com>
Commit: Michal Nazarewicz <mina86@mina86.com>
Introduce ‘auto-dim-other-buffers-hide-face’ for hidden dimmed text
Add ‘auto-dim-other-buffers-hide-face’ which has foreground and
background set to the same colour. In effect, text rendered using
that face is invisible.
This is intended as a remapping for faces which hide the text such as
‘org-hide’ face (which otherwise show the text when window is dimmed).
The face is added to ‘auto-dim-other-buffers-affected-faces’ list as
a remapping for ‘org-hide’ but any other faces which are meant to hide
the text may need to be added separately to that list.
Fixes: https://github.com/mina86/auto-dim-other-buffers.el/issues/30
---
auto-dim-other-buffers.el | 50 +++++++++++++++++++++++++++++++++++------------
1 file changed, 38 insertions(+), 12 deletions(-)
diff --git a/auto-dim-other-buffers.el b/auto-dim-other-buffers.el
index 0cf17f2a30..0d9b54b5d4 100644
--- a/auto-dim-other-buffers.el
+++ b/auto-dim-other-buffers.el
@@ -2,7 +2,7 @@
;; Author: Michal Nazarewicz <mina86@mina86.com>
;; Maintainer: Michal Nazarewicz <mina86@mina86.com>
;; URL: https://github.com/mina86/auto-dim-other-buffers.el
-;; Version: 2.0.5
+;; Version: 2.1.0
;; This file is not part of GNU Emacs.
@@ -42,13 +42,10 @@
;; (when (fboundp 'auto-dim-other-buffers-mode)
;; (auto-dim-other-buffers-mode t))))
-;; To configure how dimmed buffers look like, customise
-;; `auto-dim-other-buffers-face'. This can be accomplished by:
-;;
-;; M-x customize-face RET auto-dim-other-buffers-face RET
-
-;; More customisation can be found in ‘auto-dim-other-buffers’ customisation
-;; group which can be accessed with:
+;; To configure how dimmed buffers look like, change
+;; `auto-dim-other-buffers-face' and `auto-dim-other-buffers-hide-face' faces.
+;; Those faces as well as other settings can be found in
+;; ‘auto-dim-other-buffers’ group which can be accessed with:
;;
;; M-x customize-group RET auto-dim-other-buffers RET
@@ -74,7 +71,28 @@
By default the face is applied to, among others, the ‘default’
face and is intended to affect the background of the non-selected
-windows. Which faces are actually modified is configured by the
+windows. A related ‘auto-dim-other-buffers-hide-face’ face is
+intended for faces which need their foreground to be changed in
+sync. Which faces are actually modified is configured by the
+‘auto-dim-other-buffers-affected-faces’ variable."
+ :group 'auto-dim-other-buffers)
+
+(defface auto-dim-other-buffers-hide-face
+ '((((background light)) :foreground "#eff" :background "#eff")
+ (t :foreground "#122" :background "#122"))
+ "Face with a (presumably) dimmed background and matching foreground.
+
+The intention is that the face has the same foreground and
+background as the background of ‘auto-dim-other-buffers-face’ and
+that it’s used as remapping for faces which hide the text by
+rendering it in the same colour as background.
+
+By default it is applied to the ‘org-hide’ face and is intended
+to modify foreground of faces which hide the text by rendering it
+in the same colour as the background. Since the mode alters the
+background in a window such faces need to be updated as well.
+
+Which faces are actually modified is configured by the
‘auto-dim-other-buffers-affected-faces’ variable."
:group 'auto-dim-other-buffers)
@@ -464,15 +482,23 @@ update display state of all affected buffers."
(defcustom auto-dim-other-buffers-affected-faces
'((default . auto-dim-other-buffers-face)
- (org-block . auto-dim-other-buffers-face))
+ (org-block . auto-dim-other-buffers-face)
+ (org-hide . auto-dim-other-buffers-hide-face))
"A list of faces affected when dimming a window.
The list consists of (FACE . REMAP-FACE) pairs where FACE is an
existing face which should be affected when dimming a window and
REMAP-FACE is remapping which should be added to it.
-Typically, REMAP-FACE is ‘auto-dim-other-buffers-face’. It is
-used when the background of a FACE needs to be dimmed.
+Typically, REMAP-FACE is either ‘auto-dim-other-buffers-face’ or
+‘auto-dim-other-buffers-hide-face’. The former is used when the
+background of the face needs to be dimmed while the latter when
+in addition the foreground needs to be set to match the
+background. For example, ‘default’ face is altered by overriding
+it with the former which causes background of the window to be
+changed. On the other hand, ‘org-hide’ (which hides text by
+rendering it in the same colour as the background) is changed by
+the latter so that the hidden text stays hidden.
Changing this variable outside of customize does not update
display state of affected buffers."
- [nongnu] elpa/auto-dim-other-buffers 244c979b67 25/82: after-change-major-mode-hook on next-error-hook, (continued)
- [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
- [nongnu] elpa/auto-dim-other-buffers db5411dd17 23/82: Fix compiler warning by defining the variable, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 02ae62c5ab 37/82: Remove pre command hook, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 8b909cb210 41/82: fix change major mode on next-error-hook, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers d1ee176652 54/82: Update screenshot; make it animated, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers ec74b4803a 56/82: Split ‘adob--dim-buffer’ into two no-argument functions, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 0c15c0d3a4 52/82: s/adob--ignore-buffer/adob--never-dim-p/, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 82626612bd 71/82: Handle window and buffer switching at the same time, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 2a19931b27 80/82: Introduce ‘auto-dim-other-buffers-hide-face’ for hidden dimmed text,
ELPA Syncer <=
- [nongnu] elpa/auto-dim-other-buffers f0d48d94c3 77/82: Introduce ‘auto-dim-other-buffers-never-dim-buffer-functions’, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 33b5f88b79 82/82: Correctly handle optional kill-all-local-variables argument in advice, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 9f768ddd9a 76/82: Debounce focus-change events, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 07d906f0f0 04/82: useless extra thing, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers e473ef45ea 05/82: set buffer faces MUCH less often, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 7ed6580b7d 12/82: update sshot, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers e93f115d32 09/82: comments and fix, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers b236157a77 15/82: uhh, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 8f58e3f7fe 27/82: Use “adob--” as a prefix for private stuff., ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers d8987326e6 20/82: dim new windows that pop up, ELPA Syncer, 2022/12/12