From b44298c3e3ec485cd75745a1d476a8c49569b1c9 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 3 Feb 2002 11:40:06 +0000 Subject: [PATCH] (term-emulate-terminal): Extract proper command string which is supplied to term-command-hook. --- lisp/term.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/term.el b/lisp/term.el index 7311b09b2a0..005ee02c8cc 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -2830,11 +2830,11 @@ See `term-prompt-regexp'." ((eq char ?\^G) (beep t)) ; Bell ((eq char ?\032) - (let ((end (string-match "\n" str i))) + (let ((end (string-match "\r?$" str i))) (if end (progn (funcall term-command-hook - (substring str (1+ i) (1- end))) - (setq i end)) + (substring str (1+ i) end)) + (setq i (match-end 0))) (setq term-terminal-parameter (substring str i)) (setq term-terminal-state 4) -- 2.39.5