]> git.eshelyaron.com Git - emacs.git/commitdiff
(term-emulate-terminal): Extract proper command string
authorEli Zaretskii <eliz@gnu.org>
Sun, 3 Feb 2002 11:25:50 +0000 (11:25 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sun, 3 Feb 2002 11:25:50 +0000 (11:25 +0000)
which is supplied to term-command-hook.

lisp/ChangeLog
lisp/term.el

index 02b6dcddcb144e6ea93102f9325ac7ba13bc4f7a..d7bdfbf26aa2f7f49ec181b7e3ef305bf95ad972 100644 (file)
@@ -1,3 +1,8 @@
+2002-02-02  Eli Zaretskii  <eliz@is.elta.co.il>
+
+       * term.el (term-emulate-terminal): Extract proper command string
+       which is supplied to term-command-hook.
+
 2002-02-03  Richard M. Stallman  <rms@gnu.org>
 
        * international/quail.el (quail-help): Don't call help-setup-xref.
index 43350c4dd91217aa4312564b4c5aea0fe5ddba28..fb2539327046d8eda25e5e68c756539087a3bcd8 100644 (file)
@@ -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)