From xemacs-m  Thu Feb 27 19:13:12 1997
Received: from jens.metrix.de (jens@jens.metrix.de [194.123.88.124])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id TAA10770
	for <xemacs-beta@xemacs.org>; Thu, 27 Feb 1997 19:13:09 -0600 (CST)
Received: (from jens@localhost) by jens.metrix.de (8.7.6/8.7.3) id CAA12755; Fri, 28 Feb 1997 02:13:04 +0100
To: xemacs-beta@xemacs.org
Subject: patch to gdbsrc
X-Face: Z[@OB)("ZvE?ev~1b+b!0ZUB.$%rh.9qE>dVf>q}Q/V?%d`J3gd!LR\aAZ8<Hwi]xTA(:*c;i3,?K?+rCy*^b$)a,}E?eo},}x2]5LlJysyoUOK"o[>K)'\Ulb7y-7*.If^;rHl['oa)n_M7E6w+LDKMs"G8_`c)uOS1^}.1|8Ill]7X68X-paeUOpBhz<F`B0?~^2Et~GYfw~/0]H]nx4~C_E/_mp#^7Ixc:
Reply-To: jens@lemming0.lem.uni-karlsruhe.de
Mime-Version: 1.0 (generated by tm-edit 7.105)
Content-Type: multipart/mixed;
 boundary="Multipart_Fri_Feb_28_02:13:03_1997-1"
Content-Transfer-Encoding: 7bit
From: Jens Lautenbacher <jens@metrix.de>
Date: 28 Feb 1997 02:13:03 +0100
Message-ID: <m3pvxl68dc.fsf@jens.metrix.de>
Lines: 66
X-Mailer: Gnus v5.4.15/XEmacs 19.15

--Multipart_Fri_Feb_28_02:13:03_1997-1
Content-Type: text/plain; charset=US-ASCII



this one fixes a annoying bug in gdbsrc which caused the cursor to
move to the gdb comint window on every print ("p" in the source buffer
or selected from the toolbar.)

   JTL



--Multipart_Fri_Feb_28_02:13:03_1997-1
Content-Type: application/octet-stream; type=patch
Content-Disposition: attachment; filename="gdbsrc.patch"
Content-Transfer-Encoding: 7bit

*** gdbsrc.el.orig	Wed Dec 18 04:52:21 1996
--- gdbsrc.el	Fri Feb 28 02:04:44 1997
***************
*** 373,391 ****
  (defun gdb-call-from-src (command)
    "Send associated gdb process COMMAND displaying source in this window."
    (setq gdbsrc-call-p t)
!   (let ((buf (or gdbsrc-associated-buffer current-gdb-buffer)))
!     (or (buffer-name buf)
! 	(error "GDB buffer deleted"))
!     (pop-to-buffer buf))
!   (goto-char (point-max))
!   (beginning-of-line)
!   ;; Go past gdb prompt 
!   (re-search-forward
!    gdb-prompt-pattern (save-excursion (end-of-line) (point))  t)
!   ;; Delete any not-supposed-to-be-there text
!   (delete-region (point) (point-max)) 
!   (insert command)
!   (comint-send-input))
  
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  ;;;
--- 373,394 ----
  (defun gdb-call-from-src (command)
    "Send associated gdb process COMMAND displaying source in this window."
    (setq gdbsrc-call-p t)
!     (let ((src-win (selected-window))
! 	  (buf (or gdbsrc-associated-buffer current-gdb-buffer)))
!       (or (buffer-name buf)
! 	  (error "GDB buffer deleted"))
!       (pop-to-buffer buf)
!       (goto-char (point-max))
!       (beginning-of-line)
!       ;; Go past gdb prompt 
!       (re-search-forward
!        gdb-prompt-pattern (save-excursion (end-of-line) (point))  t)
!       ;; Delete any not-supposed-to-be-there text
!       (delete-region (point) (point-max)) 
!       (insert command)
!       (comint-send-input)
!       (select-window src-win)
!       ))
  
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  ;;;

--Multipart_Fri_Feb_28_02:13:03_1997-1--

