mirror of
https://github.com/vale981/emacs-jupyter
synced 2025-03-06 07:51:39 -05:00
Turn jupyter-add-finalizer
into a function
This commit is contained in:
parent
36f714a0d0
commit
658886780e
1 changed files with 2 additions and 1 deletions
|
@ -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))))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue