emacs-devel
[Top][All Lists]
Advanced

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

Re: [patch] Prompt problems in tcl-mode


From: Stefan Monnier
Subject: Re: [patch] Prompt problems in tcl-mode
Date: Tue, 18 Apr 2006 17:16:58 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

> 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
>   <http://wiki.tcl.tk/3005>:

>        [..] 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*"))




reply via email to

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