mirror of
https://github.com/vale981/emacs-jupyter
synced 2025-03-05 15:41:37 -05:00
Fix for "No matching paren" when entering Pkg mode in IJulia REPL
This commit is contained in:
parent
123d847a3e
commit
c70aeec6b6
1 changed files with 8 additions and 4 deletions
|
@ -105,10 +105,14 @@ Make the character after `point' invisible."
|
|||
(goto-char beg)
|
||||
(cl-case (char-after)
|
||||
(?\]
|
||||
;; TODO: Get rid of the "No matching paren" message caused by
|
||||
;; `blink-paren-function' which is called in `post-self-insert-hook'.
|
||||
;; Maybe remap `self-insert-command' to handle this case?
|
||||
(let ((pkg-prompt (jupyter-eval "import Pkg; Pkg.REPLMode.promptf()")))
|
||||
(when (bound-and-true-p blink-paren-function)
|
||||
;; Spoof `last-command-event' so that a "No matching paren" message
|
||||
;; doesn't happen.
|
||||
(setq last-command-event ?\[))
|
||||
(let ((pkg-prompt
|
||||
;; FIXME: This modifies the ans variable in IJulia. Maybe
|
||||
;; evaluate this in the user-expressions of an execute-request?
|
||||
(jupyter-eval "import Pkg; Pkg.REPLMode.promptf()")))
|
||||
(when pkg-prompt
|
||||
(put-text-property (point) (1+ (point)) 'syntax-table '(3 . ?_))
|
||||
(jupyter-julia-update-prompt
|
||||
|
|
Loading…
Add table
Reference in a new issue