Mercurial > hg > xemacs-beta
comparison lisp/comint/gdbsrc.el @ 26:441bb1e64a06 r19-15b96
Import from CVS: tag r19-15b96
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:51:32 +0200 |
parents | b82b59fe008d |
children | 131b0175ea99 |
comparison
equal
deleted
inserted
replaced
25:383a494979f8 | 26:441bb1e64a06 |
---|---|
371 ;; Sends commands to gdb process. | 371 ;; Sends commands to gdb process. |
372 | 372 |
373 (defun gdb-call-from-src (command) | 373 (defun gdb-call-from-src (command) |
374 "Send associated gdb process COMMAND displaying source in this window." | 374 "Send associated gdb process COMMAND displaying source in this window." |
375 (setq gdbsrc-call-p t) | 375 (setq gdbsrc-call-p t) |
376 (let ((buf (or gdbsrc-associated-buffer current-gdb-buffer))) | 376 (let ((src-win (selected-window)) |
377 (or (buffer-name buf) | 377 (buf (or gdbsrc-associated-buffer current-gdb-buffer))) |
378 (error "GDB buffer deleted")) | 378 (or (buffer-name buf) |
379 (pop-to-buffer buf)) | 379 (error "GDB buffer deleted")) |
380 (goto-char (point-max)) | 380 (pop-to-buffer buf) |
381 (beginning-of-line) | 381 (goto-char (point-max)) |
382 ;; Go past gdb prompt | 382 (beginning-of-line) |
383 (re-search-forward | 383 ;; Go past gdb prompt |
384 gdb-prompt-pattern (save-excursion (end-of-line) (point)) t) | 384 (re-search-forward |
385 ;; Delete any not-supposed-to-be-there text | 385 gdb-prompt-pattern (save-excursion (end-of-line) (point)) t) |
386 (delete-region (point) (point-max)) | 386 ;; Delete any not-supposed-to-be-there text |
387 (insert command) | 387 (delete-region (point) (point-max)) |
388 (comint-send-input)) | 388 (insert command) |
389 (comint-send-input) | |
390 (select-window src-win) | |
391 )) | |
389 | 392 |
390 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 393 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
391 ;;; | 394 ;;; |
392 ;;; Define Commands for GDB SRC Mode Buffer | 395 ;;; Define Commands for GDB SRC Mode Buffer |
393 ;;; | 396 ;;; |