jupyter-repl-history-add-input -> jupyter-repl-history-add

This commit is contained in:
Nathaniel Nicandro 2019-02-14 16:15:00 -06:00
parent 913af5c314
commit 75f9df7d0a
No known key found for this signature in database
GPG key ID: C34814B309DD06B8
2 changed files with 6 additions and 6 deletions

View file

@ -692,7 +692,7 @@ lines, truncate it to something less than
;;; Handlers
(defun jupyter-repl-history-add-input (code)
(defun jupyter-repl-history-add (code)
"Add CODE as the newest element in the REPL history."
;; Ensure the newest element is actually the newest element and not the most
;; recently navigated history element.
@ -724,7 +724,7 @@ lines, truncate it to something less than
(setq silent t)
;; Needed by the prompt insertion below
(oset client execution-count (1+ (oref client execution-count)))
(jupyter-repl-history-add-input code))
(jupyter-repl-history-add code))
(let ((req (cl-call-next-method
client :code code :silent silent :store-history store-history
:user-expressions user-expressions :allow-stdin allow-stdin
@ -1227,7 +1227,7 @@ value."
(ring-elements jupyter-repl-history)))
(let ((ex (cl-call-next-method)))
(prog1 ex
(jupyter-repl-history-add-input ex)))))
(jupyter-repl-history-add ex)))))
;;; Kernel management

View file

@ -857,9 +857,9 @@ The history contains the elements \"1\", \"2\", and \"3\", the
last element being the newest element added to the history."
(setq-local jupyter-repl-history (make-ring 5))
(ring-insert jupyter-repl-history 'jupyter-repl-history)
(jupyter-repl-history-add-input "1")
(jupyter-repl-history-add-input "2")
(jupyter-repl-history-add-input "3"))
(jupyter-repl-history-add "1")
(jupyter-repl-history-add "2")
(jupyter-repl-history-add "3"))
(ert-deftest jupyter-repl-history ()
:tags '(repl)