[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/cider 4b1710595f 5/8: Deprecate 3-argument call to nrepl-d
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/cider 4b1710595f 5/8: Deprecate 3-argument call to nrepl-dict-get |
Date: |
Tue, 11 Jun 2024 03:59:33 -0400 (EDT) |
branch: elpa/cider
commit 4b1710595f88c3fed5f29d69af96a7444dae480b
Author: yuhan0 <qythium@gmail.com>
Commit: Bozhidar Batsov <bozhidar@batsov.dev>
Deprecate 3-argument call to nrepl-dict-get
Calling the function with 3 arguments will continue to work, but
raise a warning during byte compilation.
---
nrepl-dict.el | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/nrepl-dict.el b/nrepl-dict.el
index dadf41f7fa..a408d13625 100644
--- a/nrepl-dict.el
+++ b/nrepl-dict.el
@@ -61,14 +61,20 @@ whose car is KEY. Comparison is done with `equal'."
(member key (nrepl-dict-keys dict)))
(defun nrepl-dict-get (dict key &optional default)
- "Get from DICT value associated with KEY, optional DEFAULT if KEY not in
DICT.
-If dict is nil, return nil. If DEFAULT not provided, and KEY not in DICT,
-return nil. If DICT is not an nREPL dict object, an error is thrown."
+ "Get from DICT value associated with KEY.
+If DICT is nil, return nil.
+If DICT is not an nREPL dict object, an error is thrown.
+
+If KEY is not in DICT, return DEFAULT (if provided).
+Note that the use of DEFAULT is deprecated and will be
+removed in a future release."
+ (declare (advertised-calling-convention (dict key) "1.16"))
(when dict
(if (nrepl-dict-p dict)
;; Note: The structure of the following expression avoids the
;; expensive containment check in nearly all cases, see #3717
(or (lax-plist-get (cdr dict) key)
+ ;; TODO: remove DEFAULT argument and the following clause
(when default
(and (not (nrepl-dict-contains dict key))
default)))
- [nongnu] elpa/cider updated (3ab2709742 -> 105da319b0), ELPA Syncer, 2024/06/11
- [nongnu] elpa/cider 738f393ec1 1/8: Change the way cider-docstring--format performs formatting, ELPA Syncer, 2024/06/11
- [nongnu] elpa/cider 39ed671158 2/8: Refactor cider-clojuredocs to use cider-docstring--format, ELPA Syncer, 2024/06/11
- [nongnu] elpa/cider 4b1710595f 5/8: Deprecate 3-argument call to nrepl-dict-get,
ELPA Syncer <=
- [nongnu] elpa/cider 451f72e07d 3/8: Tweak docstring of cider-docstring--format and remove redundant comment, ELPA Syncer, 2024/06/11
- [nongnu] elpa/cider 54641395b6 4/8: Improve performance of nrepl-dict-get, ELPA Syncer, 2024/06/11
- [nongnu] elpa/cider abe972ad9f 7/8: Inline nrepl-dict predicates, ELPA Syncer, 2024/06/11
- [nongnu] elpa/cider 9db0ceecc1 6/8: Add details to nrepl-dict commentary, ELPA Syncer, 2024/06/11
- [nongnu] elpa/cider 105da319b0 8/8: Modify changelog, ELPA Syncer, 2024/06/11