File tree 1 file changed +9
-3
lines changed
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -61,14 +61,20 @@ whose car is KEY. Comparison is done with `equal'."
61
61
(member key (nrepl-dict-keys dict)))
62
62
63
63
(defun nrepl-dict-get (dict key &optional default )
64
- " Get from DICT value associated with KEY, optional DEFAULT if KEY not in DICT.
65
- If dict is nil, return nil. If DEFAULT not provided, and KEY not in DICT,
66
- return nil. If DICT is not an nREPL dict object, an error is thrown."
64
+ " Get from DICT value associated with KEY.
65
+ If DICT is nil, return nil.
66
+ If DICT is not an nREPL dict object, an error is thrown.
67
+
68
+ If KEY is not in DICT, return DEFAULT (if provided).
69
+ Note that the use of DEFAULT is deprecated and will be
70
+ removed in a future release."
71
+ (declare (advertised-calling-convention (dict key) " 1.16" ))
67
72
(when dict
68
73
(if (nrepl-dict-p dict)
69
74
; ; Note: The structure of the following expression avoids the
70
75
; ; expensive containment check in nearly all cases, see #3717
71
76
(or (lax-plist-get (cdr dict) key)
77
+ ; ; TODO: remove DEFAULT argument and the following clause
72
78
(when default
73
79
(and (not (nrepl-dict-contains dict key))
74
80
default )))
You can’t perform that action at this time.
0 commit comments