[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/auto-dim-other-buffers a385b6013e 39/82: Drop turn-{on, of
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/auto-dim-other-buffers a385b6013e 39/82: Drop turn-{on, off}-* functions. |
Date: |
Mon, 12 Dec 2022 20:58:41 -0500 (EST) |
branch: elpa/auto-dim-other-buffers
commit a385b6013ed23c36816863cb4a5f8550fdc627fd
Author: Michal Nazarewicz <mina86@mina86.com>
Commit: Michal Nazarewicz <mina86@mina86.com>
Drop turn-{on,off}-* functions.
`turn-on-auto-dim-other-buffers' and `turn-off-auto-dim-other-buffers'
functions were not really useful. For example, they did not set the
`auto-dim-other-buffers-mode' variable so they could not be used
instead of calling the minor mode. Furthermore, since [cfab476: Move
hooks adding/removing to separate function], they were pretty short
thus separating them did not provide much benefits as far as
readability is concerned. Because of that, the functions are now
removed, and their code put directly into the minor mode function.
---
auto-dim-other-buffers.el | 21 +++++++--------------
1 file changed, 7 insertions(+), 14 deletions(-)
diff --git a/auto-dim-other-buffers.el b/auto-dim-other-buffers.el
index 67ed07d987..8377f5427d 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.2
+;; Version: 1.6.3
;; This file is not part of GNU Emacs.
@@ -120,25 +120,18 @@ function."
(next-error-hook 'adob--after-change-major-mode-hook)))
(apply callback args)))
-(defun turn-off-auto-dim-other-buffers ()
- "Turn `auto-dim-other-buffers-mode' off."
- (adob--hooks 'remove-hook)
- (adob--dim-all-buffers nil))
-
-(defun turn-on-auto-dim-other-buffers ()
- "Turn `auto-dim-other-buffers-mode' on."
- (setq adob--last-buffer nil)
- (adob--dim-all-buffers t)
- (adob--hooks 'add-hook))
-
;;;###autoload
(define-minor-mode auto-dim-other-buffers-mode
"Visually makes non-current buffers less prominent"
:lighter " Dim"
:global t
(if auto-dim-other-buffers-mode
- (turn-on-auto-dim-other-buffers)
- (turn-off-auto-dim-other-buffers)))
+ (progn
+ (setq adob--last-buffer nil)
+ (adob--dim-all-buffers t)
+ (adob--hooks 'add-hook))
+ (adob--hooks 'remove-hook)
+ (adob--dim-all-buffers nil)))
(provide 'auto-dim-other-buffers)
- [nongnu] elpa/auto-dim-other-buffers 9f768ddd9a 76/82: Debounce focus-change events, (continued)
- [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
- [nongnu] elpa/auto-dim-other-buffers 6600c79600 24/82: Mark adob-mode as autoload function, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 932b16751f 31/82: .gitignore *.elc files., ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers a385b6013e 39/82: Drop turn-{on, off}-* functions.,
ELPA Syncer <=
- [nongnu] elpa/auto-dim-other-buffers 8c4470713f 33/82: Set lexical binding on., ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers a066c32ada 40/82: Allow disabling “dimming on focus out” feature, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 8b1d8803b5 43/82: Fix Markdown formatting in README file, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers e9c886fac5 42/82: Use even number of arguments for `setq', ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 853523a854 50/82: Don't dim last buffer when switching to minibuffer or echo area., ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers efd617c999 60/82: Make sure current buffer is not dimmed when the mode is enabled, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers e4ef0a93ca 66/82: Unconditionally undim selected buffer when focus is regained, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers a87cf772ac 61/82: Dim only the last buffer when loosing focus, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 087baafa08 51/82: Move minibuffer check to the beginning of ‘adob--buffer-list-update-hook’, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers bedeef9ea3 70/82: Support ‘adow-mode’ since the first Emacs 27 preview releases, ELPA Syncer, 2022/12/12