From 658886780e58ba59f8d045786e516e8c7d52aac5 Mon Sep 17 00:00:00 2001 From: Nathaniel Nicandro Date: Wed, 9 Sep 2020 14:27:01 -0500 Subject: [PATCH] Turn `jupyter-add-finalizer` into a function --- jupyter-base.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jupyter-base.el b/jupyter-base.el index 8377103..14e263e 100644 --- a/jupyter-base.el +++ b/jupyter-base.el @@ -375,9 +375,10 @@ class corresponding to the symbol `jupyter-instance-tracker'." (defvar jupyter-finalizers (make-hash-table :weakness 'key :test #'eq)) -(cl-defgeneric jupyter-add-finalizer (obj (fn function)) +(defun jupyter-add-finalizer (obj fn) "Add FN to the finalizers of OBJ." (declare (indent 1)) + (cl-check-type fn function) (cl-callf append (gethash obj jupyter-finalizers) (list (make-finalizer fn))))