Commit 3285e13d authored by João Távora's avatar João Távora
Browse files

Fixes to the "Copy Call to REPL" interface

* sly.el (sldb--guess-frame-name): New function.
(sldb-frame-button): Use it.

* contrib/sly-mrepl.el (define-sly-contrib sly-mrepl): Better keydindings.
parent 167cfc46
Showing with 11 additions and 4 deletions
+11 -4
......@@ -13,8 +13,10 @@
;; the `sly-inspector-part', `sldb-local-variable' and
;; `sly-trace-dialog-part' to include it.
;;
(sly-button-define-part-action sly-mrepl-copy-part-to-repl "Copy to REPL" (kbd "M-RET"))
(sly-button-define-part-action sly-mrepl-copy-call-to-repl "Copy call to REPL" (kbd "M-S-RET"))
(sly-button-define-part-action sly-mrepl-copy-part-to-repl
"Copy to REPL" (kbd "M-RET"))
(sly-button-define-part-action sly-mrepl-copy-call-to-repl
"Copy call to REPL" (kbd "M-S-<return>"))
(button-type-put 'sly-inspector-part
'sly-mrepl-copy-part-to-repl
'sly-inspector-copy-part-to-repl)
......
......@@ -5352,6 +5352,12 @@ If MORE is non-nil, more frames are on the Lisp stack."
'action 'sldb-toggle-details
'mouse-action 'sldb-toggle-details)
(defun sldb--guess-frame-name (frame)
(ignore-errors
(first (car (read-from-string
(replace-regexp-in-string "#" ""
(cadr frame)))))))
(defun sldb-frame-button (label frame face &rest props)
(apply #'make-text-button label nil :type 'sldb-frame
'face face
......@@ -5359,8 +5365,7 @@ If MORE is non-nil, more frames are on the Lisp stack."
'frame-number (car frame)
'frame-string (cadr frame)
'part-args (list (car frame)
(ignore-errors
(first (car (read-from-string (cadr frame))))))
(sldb--guess-frame-name frame))
'part-label (cadr frame)
props)
label)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment