[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dtache e3193146b4 06/19: Improve initialization of pack
From: |
ELPA Syncer |
Subject: |
[elpa] externals/dtache e3193146b4 06/19: Improve initialization of packages |
Date: |
Wed, 18 May 2022 12:57:36 -0400 (EDT) |
branch: externals/dtache
commit e3193146b48a7e54506d9132b246425872395228
Author: Niklas Eklund <niklas.eklund@posteo.net>
Commit: Niklas Eklund <niklas.eklund@posteo.net>
Improve initialization of packages
---
dtache-init.el | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/dtache-init.el b/dtache-init.el
index 36c08ec189..6e73d86a31 100644
--- a/dtache-init.el
+++ b/dtache-init.el
@@ -25,6 +25,8 @@
;;;; Requirements
+(require 'subr-x)
+
(declare-function dtache-shell-mode "dtache")
(declare-function dtache-compile-start "dtache-compile")
(declare-function dtache-dired-do-shell-command "dtache-dired")
@@ -44,7 +46,7 @@
;;;; Variables
-(defvar dtache-package-integration '((compile . dtache-init-compile)
+(defvar dtache-init-package-integration '((compile . dtache-init-compile)
(dired . dtache-init-dired)
(dired-rsync . dtache-init-dired-rsync)
(eshell . dtache-init-eshell)
@@ -54,19 +56,22 @@
(vterm . dtache-init-vterm))
"Alist which contain names of packages and their initialization function.")
-(defun dtache-init (&optional packages)
+(defun dtache-init (&optional block-packages)
"Initialize `dtache' integration with all packages.
-Optionally provide a list of PACKAGES to enable integration for."
+Optionally provide a list of BLOCK-PACKAGES that should be blocked from
+being integrated with `dtache'."
;; Required for `dtache-shell-command' which is always provided
(add-hook 'shell-mode-hook #'dtache-shell-mode)
(let ((packages
- (or packages
- (seq-map #'car dtache-package-integration))))
+ (thread-last dtache-init-package-integration
+ (seq-remove (lambda (it)
+ (member (car it) block-packages)))
+ (seq-map #'car))))
(dolist (package packages)
- (funcall (alist-get package dtache-package-integration)))))
+ (funcall (alist-get package dtache-init-package-integration)))))
(defun dtache-init-shell ()
"Initialize integration with `shell'."
- [elpa] externals/dtache updated (08310ca70b -> 02651e47d3), ELPA Syncer, 2022/05/18
- [elpa] externals/dtache e3193146b4 06/19: Improve initialization of packages,
ELPA Syncer <=
- [elpa] externals/dtache b5abeb8368 09/19: Add hidden source to dtache-consult, ELPA Syncer, 2022/05/18
- [elpa] externals/dtache e034da8f30 10/19: Remove redundant dtache-setup, ELPA Syncer, 2022/05/18
- [elpa] externals/dtache 28430fbff4 13/19: Add setting for active session, ELPA Syncer, 2022/05/18
- [elpa] externals/dtache dc740b1b43 03/19: Address require in vterm, ELPA Syncer, 2022/05/18
- [elpa] externals/dtache 3103ee6118 08/19: Update indentation, ELPA Syncer, 2022/05/18
- [elpa] externals/dtache 4e7387bbe0 04/19: Add dtache-vterm-mode, ELPA Syncer, 2022/05/18
- [elpa] externals/dtache 34f5111023 11/19: Rename dtache-setup, ELPA Syncer, 2022/05/18
- [elpa] externals/dtache 6c51554e69 01/19: Improve package configuration, ELPA Syncer, 2022/05/18
- [elpa] externals/dtache 5a5b3f5db3 02/19: Fix names, ELPA Syncer, 2022/05/18
- [elpa] externals/dtache 24ceed0282 12/19: Improve dtache-init, ELPA Syncer, 2022/05/18