Skip to content

Commit 27246cd

Browse files
committed
Silence byte compiler warnings
1 parent 8fa1db1 commit 27246cd

14 files changed

+51
-55
lines changed

jupyter-base.el

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,10 @@ from a backing notebook server."
125125

126126
(defvar jupyter--debug nil
127127
"When non-nil, some parts of Jupyter will emit debug statements.
128-
If the symbol 'message, messages received by a kernel will only
128+
If the symbol \='message, messages received by a kernel will only
129129
be handled by clients when the function
130-
`jupyter--debug-replay-requests' is called manually. This
131-
allows for stepping through the code with Edebug.")
130+
`jupyter--debug-replay-requests' is called manually. This allows
131+
for stepping through the code with Edebug.")
132132

133133
(defvar jupyter--debug-request-queue nil)
134134

@@ -215,7 +215,7 @@ lists with mime-type keywords as keys.
215215
216216
A call to FUN looks like this
217217
218-
\(funcall fun MIME-TYPE '(:data D :metadata M))
218+
\(funcall fun MIME-TYPE \='(:data D :metadata M))
219219
220220
where D will be the data associated with MIME-TYPE in CONTENT and
221221
M is any associated metadata."

jupyter-channel.el

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,25 +44,25 @@
4444
Typical endpoints look like \"tcp://127.0.0.1:5555\"."))
4545
:abstract t)
4646

47-
(cl-defmethod jupyter-start ((channel jupyter-channel) &key identity)
47+
(cl-defmethod jupyter-start ((_channel jupyter-channel) &key _identity)
4848
"Start a Jupyter CHANNEL using IDENTITY as the routing ID.
4949
If CHANNEL is already alive, do nothing."
5050
(cl-call-next-method))
5151

52-
(cl-defmethod jupyter-stop ((channel jupyter-channel))
52+
(cl-defmethod jupyter-stop ((_channel jupyter-channel))
5353
"Stop a Jupyter CHANNEL.
5454
If CHANNEL is already stopped, do nothing."
5555
(cl-call-next-method))
5656

57-
(cl-defmethod jupyter-alive-p ((channel jupyter-channel))
57+
(cl-defmethod jupyter-alive-p ((_channel jupyter-channel))
5858
"Return non-nil if a CHANNEL is alive."
5959
(cl-call-next-method))
6060

61-
(cl-defmethod jupyter-send (channel type message &optional msg-id)
61+
(cl-defmethod jupyter-send (_channel _type _message &optional _msg-id)
6262
"On CHANNEL send MESSAGE which has message TYPE and optionally a MSG-ID."
6363
(cl-call-next-method))
6464

65-
(cl-defmethod jupyter-recv (channel &optional dont-wait)
65+
(cl-defmethod jupyter-recv (_channel &optional _dont-wait)
6666
"Receive a message on CHANNEL.
6767
If DONT-WAIT is non-nil, return nil immediately if there is no
6868
message available to receive."

jupyter-client.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ types.
163163
For example to prevent a client from calling its \"execute_reply\"
164164
handler:
165165
166-
(let ((jupyter-inhibit-handlers '(\"execute_reply\")))
166+
(let ((jupyter-inhibit-handlers \='(\"execute_reply\")))
167167
(jupyter-send client \"execute_request\" ...)))
168168
169169
In addition, if the first element of the list is the symbol

jupyter-ioloop.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ and define an event like
204204
Finally after adding other events and starting the ioloop we send
205205
an event like
206206
207-
(jupyter-send ioloop 'stop-channel :shell)
207+
(jupyter-send ioloop \='stop-channel :shell)
208208
209209
Then before the stop-channel event defined by
210210
`jupyter-ioloop-add-event' is called in the IOLOOP environment,
@@ -310,7 +310,7 @@ WARNING: A function added as a callback should be quoted to avoid
310310
sending closures to the IOLOOP. An example:
311311
312312
(jupyter-ioloop-add-callback ioloop
313-
`(lambda () (zmq-prin1 'foo \"bar\")))"
313+
`(lambda () (zmq-prin1 \='foo \"bar\")))"
314314
(cl-assert (functionp cb))
315315
(cl-callf append (oref ioloop callbacks) (list cb))
316316
(when (process-live-p (oref ioloop process))

jupyter-kernel-process.el

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,13 @@
3333
"Jupyter kernels as Emacs processes"
3434
:group 'jupyter)
3535

36+
(declare-function jupyter-ioloop-start "jupyter-ioloop")
37+
(declare-function jupyter-ioloop-stop "jupyter-ioloop")
38+
(declare-function jupyter-send "jupyter-ioloop")
39+
(declare-function jupyter-ioloop-alive-p "jupyter-ioloop")
3640
(declare-function jupyter-channel-ioloop-set-session "jupyter-channel-ioloop")
41+
(declare-function ansi-color-apply "ansi-color")
42+
(declare-function jupyter-hb-pause "jupyter-zmq-channel")
3743

3844
(defvar jupyter--kernel-processes '()
3945
"The list of kernel processes launched.

jupyter-monads.el

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ Ex. Unsubscribe after consuming one message
160160
161161
(jupyter-run-with-io (jupyter-publisher)
162162
(jupyter-subscribe sub)
163-
(jupyter-publish (list 'topic \"today's news\")))"
163+
(jupyter-publish (list \='topic \"today's news\")))"
164164
(declare (indent 0))
165165
(lambda (sub-content)
166166
(pcase sub-content
@@ -240,13 +240,13 @@ Ex. Publish the value 1 regardless of what is given to PUB-FN.
240240
(lambda (_)
241241
(jupyter-content 1)))
242242
243-
Ex. Publish 'app if 'app is given to a publisher, nothing is sent
243+
Ex. Publish \='app if \='app is given to a publisher, nothing is sent
244244
to subscribers otherwise. In this case, a publisher is a
245245
filter of the value given to it for publishing.
246246
247247
(jupyter-publisher
248248
(lambda (value)
249-
(if (eq value 'app)
249+
(if (eq value \='app)
250250
(jupyter-content value))))"
251251
(declare (indent 0))
252252
(let ((subs (list 'subscribers))
@@ -268,7 +268,7 @@ subscription is canceled.
268268
Ex. Subscribe to a publisher and unsubscribe after receiving two
269269
messages.
270270
271-
(let* ((msgs '())
271+
(let* ((msgs \='())
272272
(pub (jupyter-publisher))
273273
(sub (jupyter-subscriber
274274
(lambda (n)
@@ -277,10 +277,10 @@ Ex. Subscribe to a publisher and unsubscribe after receiving two
277277
(jupyter-run-with-io pub
278278
(jupyter-subscribe sub))
279279
(cl-loop
280-
for x in '(1 2 3)
280+
for x in \='(1 2 3)
281281
do (jupyter-run-with-io pub
282282
(jupyter-publish x)))
283-
(reverse msgs)) ; => '(1 2)"
283+
(reverse msgs)) ; => \='(1 2)"
284284
(declare (indent 0))
285285
(lambda (io)
286286
(funcall io (list 'subscribe sub))

jupyter-org-client.el

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
(declare-function org-next-block "org" (arg &optional backward block-regexp))
5858
(declare-function org-at-table-p "org" ())
5959
(declare-function org-inside-LaTeX-fragment-p "org" ())
60-
(declare-function org-toggle-latex-fragment "org" (&optional arg))
60+
(declare-function org-latex-preview "org" (&optional arg))
6161

6262
(defcustom jupyter-org-auto-connect t
6363
"Automatically establish a connection to a src-block session.
@@ -896,7 +896,7 @@ non-nil, return FILE with EXT as the extension. Otherwise, return
896896
FILE."
897897
(cond
898898
((null file) file)
899-
((image-type-from-file-name file) file)
899+
((image-supported-file-p file) file)
900900
((not (null ext)) (concat file "." ext))
901901
(t file)))
902902

@@ -962,7 +962,7 @@ will be inserted by calling `org-element-interpret-data' first.
962962
The returned result should be a representation of a MIME type's
963963
CONTENT. CONTENT is a property list like
964964
965-
'(:data DATA :metadata METADATA)
965+
\='(:data DATA :metadata METADATA)
966966
967967
that contains the DATA/METADATA of the mime type. As an example,
968968
if MIME is `:text/markdown', then DATA should be the markdown
@@ -1496,7 +1496,7 @@ Assumes `point' is on the #+RESULTS keyword line."
14961496
(when (eq (org-element-type context) 'paragraph)
14971497
(save-excursion
14981498
(goto-char (jupyter-org-element-begin-after-affiliated context))
1499-
(when (looking-at-p (format "^[ \t]*%s[ \t]*$" org-bracket-link-regexp))
1499+
(when (looking-at-p (format "^[ \t]*%s[ \t]*$" org-link-bracket-re))
15001500
(setq context (org-element-context)))))
15011501
context))
15021502

@@ -1636,7 +1636,7 @@ See `jupyter-org-toggle-latex'."
16361636
(let ((ov (car (overlays-at (point)))))
16371637
(unless (and ov (eq (overlay-get ov 'org-overlay-type)
16381638
'org-latex-overlay))
1639-
(org-toggle-latex-fragment))))))
1639+
(org-latex-preview))))))
16401640

16411641
;;;; Add result
16421642

jupyter-org-extensions.el

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,13 @@
3232
(eval-when-compile (require 'subr-x))
3333

3434
(declare-function org-babel-jupyter-initiate-session "ob-jupyter" (&optional session params))
35+
(declare-function org-babel-jupyter-session-initiated-p "ob-jupyter" (&optional session params))
3536
(declare-function org-babel-jupyter-src-block-session "ob-jupyter" ())
3637
(declare-function org-babel-jupyter-language-p "ob-jupyter" (lang))
3738
(declare-function org-in-src-block-p "org" (&optional inside))
3839
(declare-function org-narrow-to-subtree "org" ())
3940
(declare-function org-previous-line-empty-p "org" ())
40-
(declare-function org-show-context "org" (&optional key))
41+
(declare-function org-fold-show-context "org-fold" (&optional key))
4142
(declare-function org-next-line-empty-p "org" ())
4243
(declare-function org-element-context "org-element" (&optional element))
4344
(declare-function org-element-type "org-element" (element))
@@ -345,7 +346,7 @@ When BACKWARD is non-nil, jump to the previous block."
345346
(zerop (cl-decf count)))
346347
finally (goto-char origin)
347348
(user-error "No %s busy code blocks" (if backward "previous" "further"))))
348-
(save-match-data (org-show-context)))
349+
(save-match-data (org-fold-show-context)))
349350

350351
;;;###autoload
351352
(defun jupyter-org-previous-busy-src-block (arg)

jupyter-rest-api.el

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -616,18 +616,18 @@ remainder of PLIST.
616616
617617
So if PLIST looks like
618618
619-
'(\"api\" \"kernels\" :k1 ...)
619+
\='(\"api\" \"kernels\" :k1 ...)
620620
621-
ENDPOINT will be \"api/kernels\" and REST will be '(:k1 ...).
621+
ENDPOINT will be \"api/kernels\" and REST will be \='(:k1 ...).
622622
623623
If there is an alist after the strings of PLIST that make up the
624624
ENDPOINT, the alist is interpreted as the query component of
625625
ENDPOINT. So if PLIST looks like
626626
627-
'(\"api\" \"contents\" ((\"content\" . \"1\")) :k1 ...)
627+
\='(\"api\" \"contents\" ((\"content\" . \"1\")) :k1 ...)
628628
629629
The returned ENDPOINT will be \"api/contents?content=1\" and REST
630-
will be '(:k1 ...)."
630+
will be \='(:k1 ...)."
631631
(let (endpoint)
632632
(while (and plist (or (null (car plist))
633633
(stringp (car plist))))
@@ -675,7 +675,7 @@ as no request data at all and NOT as an empty JSON dictionary.
675675
A call to this method can also look like
676676
677677
\(jupyter-api-request client \"GET\"
678-
\"api\" \"contents\" '((\"content\" . \"1\"))
678+
\"api\" \"contents\" \='((\"content\" . \"1\"))
679679
680680
In this case, the alist after the strings that make up the base
681681
endpoint, but before the rest of the non-strings elements of

jupyter-server-kernel.el

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
(require 'jupyter-monads)
3434
(require 'websocket)
3535

36+
(declare-function jupyter-encode-raw-message "jupyter-messages")
3637
(declare-function jupyter-tramp-server-from-file-name "jupyter-tramp")
3738
(declare-function jupyter-tramp-file-name-p "jupyter-tramp")
3839
(declare-function jupyter-server-kernel-id-from-name "jupyter-server")
@@ -201,12 +202,12 @@ KERNEL.
201202
202203
To send a message to KERNEL, publish a list of the form
203204
204-
(list 'send CHANNEL MSG-TYPE CONTENT MSG-ID)
205+
(list \='send CHANNEL MSG-TYPE CONTENT MSG-ID)
205206
206207
to IO-PUB, e.g.
207208
208209
(jupyter-run-with-io IO-PUB
209-
(jupyter-publish (list 'send CHANNEL MSG-TYPE CONTENT MSG-ID)))
210+
(jupyter-publish (list \='send CHANNEL MSG-TYPE CONTENT MSG-ID)))
210211
211212
To receive messages from KERNEL, subscribe to IO-PUB e.g.
212213
@@ -216,8 +217,8 @@ To receive messages from KERNEL, subscribe to IO-PUB e.g.
216217
(lambda (msg)
217218
...))))
218219
219-
The value 'interrupt or 'shutdown can be published to ACTION-SUB
220-
to interrupt or shutdown KERNEL. The value (list 'action FN)
220+
The value \='interrupt or \='shutdown can be published to ACTION-SUB
221+
to interrupt or shutdown KERNEL. The value (list \='action FN)
221222
where FN is a single argument function can also be published, in
222223
this case FN will be evaluated on KERNEL."
223224
(jupyter-launch kernel)
@@ -262,10 +263,10 @@ this case FN will be evaluated on KERNEL."
262263
server id
263264
:custom-header-alist (jupyter-api-auth-headers server)
264265
:on-open
265-
(lambda (ws)
266+
(lambda (_ws)
266267
(setq ws-failed-to-open nil))
267268
:on-close
268-
(lambda (ws)
269+
(lambda (_ws)
269270
(if ws-failed-to-open
270271
;; TODO: Retry?
271272
(error "Kernel connection could not be established")

0 commit comments

Comments
 (0)