[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dape 66fb9d7e19 1/8: Extend 'fn to take lists of functi
From: |
ELPA Syncer |
Subject: |
[elpa] externals/dape 66fb9d7e19 1/8: Extend 'fn to take lists of functions as well |
Date: |
Thu, 14 Dec 2023 15:57:40 -0500 (EST) |
branch: externals/dape
commit 66fb9d7e19650cdd9b8295eecf0f2de6bf8f0e6c
Author: Daniel Pettersson <daniel@dpettersson.net>
Commit: Daniel Pettersson <daniel@dpettersson.net>
Extend 'fn to take lists of functions as well
---
dape.el | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/dape.el b/dape.el
index 92c190a63b..99cf7fc014 100644
--- a/dape.el
+++ b/dape.el
@@ -206,8 +206,9 @@ configuration. Each configuration, in turn, is a property
list (plist)
where keys can be symbols or keywords.
Symbol Keys (Used by Dape):
-- fn: Function takes config and returns config, used to apply changes
- to config at runtime.
+- fn: Function or list of functions, takes config and returns config.
+ If list functions are applied in order. Used for hiding unnecessary
+ configuration details from config history.
- ensure: Function to ensure that adapter is available.
- command: Shell command to initiate the debug adapter.
- command-args: List of string arguments for the command.
@@ -1836,8 +1837,13 @@ Use SKIP-COMPILE to skip compilation."
(with-current-buffer buffer
(let ((inhibit-read-only t))
(erase-buffer)))))
- (when-let ((fn (plist-get config 'fn)))
- (setq config (funcall fn (copy-tree config))))
+ (when-let ((fn (plist-get config 'fn))
+ (fns (or (and (functionp fn) (list fn))
+ (and (listp fn) fn))))
+ (setq config
+ (seq-reduce (lambda (config fn)
+ (funcall fn config))
+ fns (copy-tree config))))
(when-let ((ensure (plist-get config 'ensure)))
(funcall ensure (copy-tree config)))
(cond
- [elpa] externals/dape updated (8e855d804f -> 6def976339), ELPA Syncer, 2023/12/14
- [elpa] externals/dape aa8fa4670c 2/8: Add rdbg configuration, ELPA Syncer, 2023/12/14
- [elpa] externals/dape 020e4cbf93 3/8: Rework auto port, ELPA Syncer, 2023/12/14
- [elpa] externals/dape 66fb9d7e19 1/8: Extend 'fn to take lists of functions as well,
ELPA Syncer <=
- [elpa] externals/dape f9271ca949 6/8: Simplify info breakpoint buffer goto breakpoint, ELPA Syncer, 2023/12/14
- [elpa] externals/dape d4bba35d1c 7/8: Add tramp support for tcp connections, ELPA Syncer, 2023/12/14
- [elpa] externals/dape e336f05aa0 4/8: Use seq defaults if adapter sends event before setup, ELPA Syncer, 2023/12/14
- [elpa] externals/dape 6def976339 8/8: Fix bug in ruby config, ELPA Syncer, 2023/12/14
- [elpa] externals/dape 54aa83ae05 5/8: Fix issue where continue is executed with no stopped threads, ELPA Syncer, 2023/12/14