[Top][All Lists]

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

Incomplete input and comint-send-input

From: John Mastro
Subject: Incomplete input and comint-send-input
Date: Fri, 4 Mar 2016 15:37:08 -0800

Hello Emacsers,

In at least some comint-derived modes, ‘comint-send-input’ seems to
behave differently when the input is incomplete. Is that right? If so,
how does it do it?

Specifically, in Emacs 25's ‘inferior-scheme-mode’, if I enter this and
press ‘RET’, the input is sent to the subprocess:

    (define (add1 n) (+ n 1))

However, if I enter this incomplete input, then ‘comint-send-input’
appears to simply enter a newline:

    (define (add1

I feel like I'm probably missing something terribly obvious, but I
stepped through ‘comint-send-input’ and didn't see anything that
behaved differently in those two cases or even tried to distinguish
between them.

The context is this[1] question on Emacs.SE, where the asker would like
to define a command that behaves like ‘newline-and-indent’ if the input
is incomplete or ‘comint-send-input’ if it is complete. The question
lead me to wonder how comint does what it does, but so far my research
has left me unenlightened.




reply via email to

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