add to play button python buffer execution

This commit is contained in:
2026-04-08 20:11:54 +02:00
parent bf53e5cb45
commit 2f249d0979
2 changed files with 12 additions and 6 deletions

View File

@@ -179,11 +179,16 @@
(defun my-tool-bar-function-play (event)
"Run `C-c'."
(interactive "e")
(let ()
(pcase major-mode
('org-mode (org-ctrl-c-ctrl-c))
(_ (message "%s: %s" "not defined for this major-mode"
major-mode)) )))
(pcase major-mode
('org-mode (org-ctrl-c-ctrl-c))
('python-mode
(pcase (car event)
('double-down-mouse-1
(run-python)
(my-python-shell-send-buffer-w-main))
(_ (my-python-shell-send-buffer-w-main))))
(_ (message "%s: %s" "not defined for this major-mode"
major-mode)) ) )
(defvar my-tool-bar-button-play "Cc "
"Button to run `C-c'.")