Subject: bug#4784: variable telnet-remote-echoes non-nil causes comint-previous-prompt to fail

From: [email-masked]
Date: Thu, 22 Oct 2009 10:36:11 -0400

When running the telnet command, if variable telnet-remote-echoes is
set,  then the command comint-previous-prompt deletes the field text
property that the command comint-previous-prompt uses (assuming that
variable comint-use-prompt-regexp is nil).  It also removes the
mouse-highlighting and so mouse-2 cannot be used to re-insert that
command.

There is no need for variable telnet-remote-echoes because variable
comint-process-echoes can be used to remove the second copy, and it does
it without removing the text properties.

In GNU Emacs 22.1.2 (i686-pc-linux-gnu, X toolkit)
 of 2008-03-14 on sharmanpc.mitel.com
Windowing system distributor `The X.Org Foundation', version 11.0.60802000
configured using `configure  '--with-x-toolkit=athena' '--without-toolkit-scroll-bars''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: C
  locale-coding-system: nil
  default-enable-multibyte-characters: t

Major mode: Telnet

Minor modes in effect:
  highlight-changes-visible-mode: t
  shell-dirtrack-mode: t
  display-time-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent input:
e <tab> <return> <return> C-y C-x C-e C-g C-a C-x b 
* T <tab> <backspace> t e <tab> <return> C-y C-x C-e 
C-c C-a C-c C-a C-k p w d <return> e c h o SPC h e 
l l o <return> d a t e <return> C-y C-x C-e C-a C-k 
C-x u C-c C-a C-c C-a C-k ( e c h o SPC C-y ) C-a c 
C-a C-x u C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f 
C-f C-f C-f e c h o SPC ' C-e ' <return> C-p C-e C-x 
C-e q C-n C-n M-p C-x u <return> C-p C-p C-p C-p C-p 
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p 
C-p C-p C-p C-p C-2 C-e M-w C-f <up> <right> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> <right> <right> <right> <left> <left> 
C-f C-2 C-M-f M-w <end> <end> e c h o SPC C-y <return> 
C-p C-e C-x C-e C-n <C-return> ( s e t q SPC C-y SPC 
t ) <return> C-p C-p C-e C-x C-e C-n C-n p w d <return> 
e c h o SPC n o w SPC i t SPC i s SPC s e t <return> 
<return> <return> p w d <return> d a t e <return> C-y 
C-a C-c C-a C-e C-x C-e M-b M-b M-b ( s e t q SPC C-e 
SPC n i l ) <return> C-y M-b M-b M-b ( s e t q SPC 
C-e SPC n i L ) <backspace> <backspace> l ) C-x C-e 
C-x C-e <return> p w d <return> <help-echo> <help-echo> 
<switch-frame> <switch-frame> <switch-frame> <switch-frame> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <menu-bar> <help-menu> <re
port-emacs-bug>

Recent messages:
Undo!
Mark set [5 times]
nil
t [2 times]
Mark set
t
Mark set
nil [2 times]
Loading emacsbug...done
C-c C-p is undefined