Remove usage of deprecated when-let

This was deprecated in Emacs 26.1
This commit is contained in:
Nathaniel Nicandro 2018-11-16 04:59:09 -06:00
parent ca44a3922d
commit 50ac28910a
2 changed files with 3 additions and 3 deletions

View file

@ -573,7 +573,7 @@ necessary."
(defun jupyter--run-callbacks (req msg)
"Run REQ's MSG callbacks.
See `jupyter-add-callback'."
(when-let ((callbacks (and req (jupyter-request-callbacks req))))
(when-let* ((callbacks (and req (jupyter-request-callbacks req))))
;; Callback for all message types
(funcall (alist-get t callbacks #'identity) msg)
(funcall (alist-get (jupyter-message-type msg) callbacks #'identity) msg)))

View file

@ -178,8 +178,8 @@ decoded string."
;; string
(json-unknown-keyword str))))
(prog1 val
(when-let ((msg-type (and (listp val)
(plist-get val :msg_type))))
(when-let* ((msg-type (and (listp val)
(plist-get val :msg_type))))
(plist-put
val :msg_type (jupyter-message-type-as-keyword msg-type)))))))