From: Eli Zaretskii Date: Sun, 3 Feb 2002 11:25:50 +0000 (+0000) Subject: (term-emulate-terminal): Extract proper command string X-Git-Tag: ttn-vms-21-2-B4~16865 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=46ea0665a7fc51d5e1c59f74dd0be0fd857e0f76;p=emacs.git (term-emulate-terminal): Extract proper command string which is supplied to term-command-hook. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 02b6dcddcb1..d7bdfbf26aa 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2002-02-02 Eli Zaretskii + + * term.el (term-emulate-terminal): Extract proper command string + which is supplied to term-command-hook. + 2002-02-03 Richard M. Stallman * international/quail.el (quail-help): Don't call help-setup-xref. 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)