From fe6cf4be4826cb0a0984b612b39d9f761db145db Mon Sep 17 00:00:00 2001 From: Nathaniel Nicandro Date: Sat, 2 Mar 2019 17:44:57 -0600 Subject: [PATCH] Fix documentation of hook variables --- jupyter-base.el | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/jupyter-base.el b/jupyter-base.el index 3f3624e..4418af6 100644 --- a/jupyter-base.el +++ b/jupyter-base.el @@ -60,7 +60,10 @@ client use `jupyter-set'." :type 'boolean) (defcustom jupyter-iopub-message-hook nil - "Hook run with one argument, a message received on the IOPub channel. + "Hook run when a message is received on the IOPub channel. +The hook is called with two arguments, the Jupyter client and the +message it received. + Do not add to this hook variable directly, use `jupyter-add-hook'. If any of the message hooks return a non-nil value, the client handlers will be prevented from running for the @@ -70,7 +73,10 @@ message." (put 'jupyter-iopub-message-hook 'permanent-local t) (defcustom jupyter-shell-message-hook nil - "Hook run with one argument, a message received on the SHELL channel. + "Hook run when a message is received on the SHELL channel. +The hook is called with two arguments, the Jupyter client and the +message it received. + Do not add to this hook variable directly, use `jupyter-add-hook'. If any of the message hooks return a non-nil value, the client handlers will be prevented from running for the @@ -80,11 +86,14 @@ message." (put 'jupyter-shell-message-hook 'permanent-local t) (defcustom jupyter-stdin-message-hook nil - "Hook run with one argument, a message received on the STDIN channel. -Do not add to this hook variable directly, use -`jupyter-add-hook'. If any of the message hooks return a non-nil -value, the client handlers will be prevented from running for the -message." + "Hook run when a message is received on the STDIN channel. +The hook is called with two arguments, the Jupyter client and the +message it received. + +Do not add to this hook variable directly, +use `jupyter-add-hook'. If any of the message hooks return a +non-nil value, the client handlers will be prevented from running +for the message." :group 'jupyter :type 'hook) (put 'jupyter-stdin-message-hook 'permanent-local t)