From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [patch] Prompt problems in tcl-mode Date: Tue, 18 Apr 2006 17:16:58 -0400 Message-ID: <87wtdmk2ny.fsf-monnier+emacs@gnu.org> References: <877j5mwr28.fsf@Jesper-Harders-Computer.local> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1145395047 18795 80.91.229.2 (18 Apr 2006 21:17:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 18 Apr 2006 21:17:27 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 18 23:17:25 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FVxZU-0000ly-Oi for ged-emacs-devel@m.gmane.org; Tue, 18 Apr 2006 23:17:17 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FVxZU-0003Y1-6w for ged-emacs-devel@m.gmane.org; Tue, 18 Apr 2006 17:17:16 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FVxZH-0003UN-0o for emacs-devel@gnu.org; Tue, 18 Apr 2006 17:17:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FVxZE-0003ST-WA for emacs-devel@gnu.org; Tue, 18 Apr 2006 17:17:02 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FVxZE-0003Re-8e for emacs-devel@gnu.org; Tue, 18 Apr 2006 17:17:00 -0400 Original-Received: from [209.226.175.54] (helo=tomts10-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FVxaB-0001yv-Pc for emacs-devel@gnu.org; Tue, 18 Apr 2006 17:17:59 -0400 Original-Received: from alfajor ([70.53.192.213]) by tomts10-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20060418211659.HGFN20622.tomts10-srv.bellnexxia.net@alfajor>; Tue, 18 Apr 2006 17:16:59 -0400 Original-Received: by alfajor (Postfix, from userid 1000) id 84B7CD7C8B; Tue, 18 Apr 2006 17:16:58 -0400 (EDT) Original-To: emacs-devel@gnu.org In-Reply-To: <877j5mwr28.fsf@Jesper-Harders-Computer.local> (Jesper Harder's message of "Tue, 18 Apr 2006 22:45:51 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:53031 Archived-At: > The following patch adresses two problems in Tcl mode: Thanks. I've installed a similar patch. > * On ms-windows /no/ prompt is displayed. The reason is explained on > : > [..] on Windows, Emacs is unable to make the Tcl interpreter > start in the "interactive" mode. The problem is that Tcl calls > istty() to determine whether tcl_interactive should be set and > whether prompts should be displayed. But the Windows version of > Emacs can not make istty() return the right value so this > doesn't happen and tclsh thinks it's running non-interactive. > My change makes it work out-of-the-box if you're using tclsh. It > doesn't fix it if you're using wish, though (which is the default in > Emacs). I've used a slightly different check (check process-tty-name instead of system-type=windows-nt, see below), hoping to make it more specific (and more general at the same time). Can you confirm that it works as well for you, Stefan @@ -1149,7 +1153,12 @@ (unless (comint-check-proc "*inferior-tcl*") (set-buffer (apply (function make-comint) "inferior-tcl" cmd nil tcl-command-switches)) - (inferior-tcl-mode)) + (inferior-tcl-mode) + ;; Make tclsh display a prompt on ms-windows (or under Unix, when a tty + ;; wasn't used). Doesn't affect wish, unfortunately. + (unless (process-tty-name (inferior-tcl-proc)) + (tcl-send-string (inferior-tcl-proc) + "set ::tcl_interactive 1; concat\n"))) (set (make-local-variable 'tcl-application) cmd) (setq inferior-tcl-buffer "*inferior-tcl*") (pop-to-buffer "*inferior-tcl*"))