[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How automatically answer same 2 questions that always pop up for a c
From: |
John Mastro |
Subject: |
Re: How automatically answer same 2 questions that always pop up for a certain Emacs command (python-mode's python-shell-send-region command) |
Date: |
Wed, 10 Dec 2014 13:17:39 -0800 |
Hi,
Chris Seberino <cseberino@gmail.com> wrote:
> How automatically answer same 2 questions that always pop up for
> python-mode's python-shell-send-region command?
>
> python-shell-send-region asks for python interpreter to use and
> question about separate processes. I don't want to always answer that.
>
> Thanks!
>
> cs
If I understand correctly, I think this will do what you want.
(defun python-shell-get-or-create-process-noask
(old &optional _cmd _dedicated show)
(funcall old (python-shell-parse-command) t show))
(advice-add 'python-shell-get-or-create-process
:around
#'python-shell-get-or-create-process-noask)
Hope that helps!
--
john