emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org 9490baa8bc 2/4: ob-python: Handle newer version of


From: ELPA Syncer
Subject: [elpa] externals/org 9490baa8bc 2/4: ob-python: Handle newer version of python-mode.el
Date: Wed, 26 Oct 2022 00:58:21 -0400 (EDT)

branch: externals/org
commit 9490baa8bc203a1c5436e2ca2f4af3138166e72e
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>

    ob-python: Handle newer version of python-mode.el
    
    * lisp/ob-python.el (py-choose-shell):
    (py-toggle-shells): Use the new function name.
    (py-default-interpreter): Remove the variable that is no longer
    provided by python-mode.el.
    (org-babel-python-initiate-session-by-key): Use `py-choose-shell'.
    
    Reported-by: Christian Köstlin <christian.koestlin@gmail.com>
---
 lisp/ob-python.el | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lisp/ob-python.el b/lisp/ob-python.el
index 4306634e6d..c6f93a6095 100644
--- a/lisp/ob-python.el
+++ b/lisp/ob-python.el
@@ -37,7 +37,7 @@
 (require 'python)
 
 (declare-function py-shell "ext:python-mode" (&rest args))
-(declare-function py-toggle-shells "ext:python-mode" (arg))
+(declare-function py-choose-shell "ext:python-mode" (&optional shell))
 (declare-function py-shell-send-string "ext:python-mode" (strg &optional 
process))
 
 (defvar org-babel-tangle-lang-exts)
@@ -182,7 +182,6 @@ Emacs-lisp table, otherwise return the results as a string."
        (substring name 1 (- (length name) 1))
       name)))
 
-(defvar py-default-interpreter)
 (defvar py-which-bufname)
 (defvar python-shell-buffer-name)
 (defun org-babel-python-initiate-session-by-key (&optional session)
@@ -208,7 +207,7 @@ then create.  Return the initialized session."
        ;; Make sure that py-which-bufname is initialized, as otherwise
        ;; it will be overwritten the first time a Python buffer is
        ;; created.
-       (py-toggle-shells py-default-interpreter)
+       (py-choose-shell)
        ;; `py-shell' creates a buffer whose name is the value of
        ;; `py-which-bufname' with '*'s at the beginning and end
        (let* ((bufname (if (and py-buffer (buffer-live-p py-buffer))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]