bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: term.el (term-emulate-terminal)


From: Harry Kuiper
Subject: Re: term.el (term-emulate-terminal)
Date: 14 Apr 2002 00:31:48 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Harry Kuiper <hkuiper@xs4all.nl> writes:
<snip>
> present.  Shouldn't the regexp match zero or more ^Z's followed by a
> newline instead of at least one ^Z?

Wrong track didn't work.  I misunderstood the meaning of ? in elisp
regexps.

However the version below (eterm.el.hk) works OK for me.  The
difference is in the way the position to resume processing is
determined after the \032 escape is handled.

cd /usr/local/share/emacs/21.2/lisp/
diff -uw /usr/local/share/emacs/21.2/lisp/term.el.broken 
/usr/local/share/emacs/21.2/lisp/term.el.hk
--- /usr/local/share/emacs/21.2/lisp/term.el.broken     Sun Feb  3 12:56:52 2002
+++ /usr/local/share/emacs/21.2/lisp/term.el.hk Sun Apr 14 00:11:47 2002
@@ -2830,11 +2830,11 @@
                           ((eq char ?\^G)
                            (beep t)) ; Bell
                           ((eq char ?\032)
-                           (let ((end (string-match "\r?$" str i)))
+                           (let ((end (string-match "\r?\n" str i)))
                              (if end
                                  (progn (funcall term-command-hook
                                                  (substring str (1+ i) end))
-                                        (setq i (match-end 0)))
+                                        (setq i (1+ end)))
                                (setq term-terminal-parameter
                                      (substring str i))
                                (setq term-terminal-state 4)

Diff finished at Sun Apr 14 00:25:46
                            ~~~~~~~
Oops, time for bed now :-) ----^

-- 
Harry Kuiper                 hkuiper@xs4all.nl
Haarlem, The Netherlands



reply via email to

[Prev in Thread] Current Thread [Next in Thread]