summaryrefslogtreecommitdiff
path: root/lisp/term.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2002-02-03 11:25:50 +0000
committerEli Zaretskii <eliz@gnu.org>2002-02-03 11:25:50 +0000
commit46ea0665a7fc51d5e1c59f74dd0be0fd857e0f76 (patch)
treea07d238fe6eb6b6dd0dc422f719555c3659406ce /lisp/term.el
parent47edc1f71812081d29b099a966c60293e8aa2c55 (diff)
downloademacs-46ea0665a7fc51d5e1c59f74dd0be0fd857e0f76.tar.gz
(term-emulate-terminal): Extract proper command string
which is supplied to term-command-hook.
Diffstat (limited to 'lisp/term.el')
-rw-r--r--lisp/term.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/term.el b/lisp/term.el
index 43350c4dd91..fb253932704 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -2827,11 +2827,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)