From: Eli Zaretskii Date: Sun, 3 Feb 2002 11:40:06 +0000 (+0000) Subject: (term-emulate-terminal): Extract proper command string X-Git-Tag: emacs-21.2~126 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b44298c3e3ec485cd75745a1d476a8c49569b1c9;p=emacs.git (term-emulate-terminal): Extract proper command string which is supplied to term-command-hook. --- 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)