[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: term.el (term-emulate-terminal)
From: |
Daiki Ueno |
Subject: |
Re: term.el (term-emulate-terminal) |
Date: |
Sun, 14 Apr 2002 10:17:35 +0900 |
>>>>> In <87ofgn1b8r.fsf@mumon.localnet>
>>>>> Harry Kuiper <hkuiper@xs4all.nl> wrote:
> However the version below (eterm.el.hk) works OK for me. The
> difference is in the way the position to resume processing is
> determined after the \032 escape is handled.
Your patch will work fine when there is no "\r" in str, but otherwise it
will be splitted up before "\n".
But well, I probably found the cause. The match-data tends to be lost
during executing term-command-hook. Therefore what I think the proper
fix is below:
Index: term.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/term.el,v
retrieving revision 1.46
diff -u -F^( -r1.46 term.el
--- term.el 3 Feb 2002 11:25:23 -0000 1.46
+++ term.el 14 Apr 2002 00:56:23 -0000
@@ -2827,11 +2827,11 @@ (defun term-emulate-terminal (proc str)
((eq char ?\^G)
(beep t)) ; Bell
((eq char ?\032)
- (let ((end (string-match "\r?$" str i)))
+ (let ((end (string-match "\r?\n" str i)))
(if end
- (progn (funcall term-command-hook
- (substring str (1+ i) end))
- (setq i (match-end 0)))
+ (funcall term-command-hook
+ (prog1 (substring str (1+ i) end)
+ (setq i (match-end 0))))
(setq term-terminal-parameter
(substring str i))
(setq term-terminal-state 4)
Could you please try this one?
Regards,
--
Daiki Ueno
- term.el (term-emulate-terminal), Harry Kuiper, 2002/04/13
- Re: term.el (term-emulate-terminal), Eli Zaretskii, 2002/04/13
- Re: term.el (term-emulate-terminal), Daiki Ueno, 2002/04/13
- Re: term.el (term-emulate-terminal), Eli Zaretskii, 2002/04/13
- Re: term.el (term-emulate-terminal), Harry Kuiper, 2002/04/13
- Re: term.el (term-emulate-terminal), Daiki Ueno, 2002/04/13
- Re: term.el (term-emulate-terminal), Harry Kuiper, 2002/04/13
- Re: term.el (term-emulate-terminal), Harry Kuiper, 2002/04/13
- Re: term.el (term-emulate-terminal), Harry Kuiper, 2002/04/13
- Re: term.el (term-emulate-terminal),
Daiki Ueno <=
- Re: term.el (term-emulate-terminal), Harry Kuiper, 2002/04/14
- Re: term.el (term-emulate-terminal), Eli Zaretskii, 2002/04/16