emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/progmodes/gud.el


From: Nick Roberts
Subject: [Emacs-diffs] Changes to emacs/lisp/progmodes/gud.el
Date: Tue, 29 Mar 2005 15:59:42 -0500

Index: emacs/lisp/progmodes/gud.el
diff -c emacs/lisp/progmodes/gud.el:1.29 emacs/lisp/progmodes/gud.el:1.30
*** emacs/lisp/progmodes/gud.el:1.29    Wed Feb  2 05:52:51 2005
--- emacs/lisp/progmodes/gud.el Tue Mar 29 20:59:42 2005
***************
*** 531,536 ****
--- 531,539 ----
  
  (defvar gdb-first-prompt t)
  
+ (defvar gud-filter-pending-text nil
+   "Non-nil means this is text that has been saved for later in `gud-filter'.")
+ 
  ;;;###autoload
  (defun gdb (command-line)
    "Run gdb on program FILE in buffer *gud-FILE*.
***************
*** 562,567 ****
--- 565,571 ----
    (setq comint-prompt-regexp "^(.*gdb[+]?) *")
    (setq paragraph-start comint-prompt-regexp)
    (setq gdb-first-prompt t)
+   (setq gud-filter-pending-text nil)
    (run-hooks 'gdb-mode-hook))
  
  ;; One of the nice features of GDB is its impressive support for
***************
*** 2445,2453 ****
    "Non-nil means don't process anything from the debugger right now.
  It is saved for when this flag is not set.")
  
- (defvar gud-filter-pending-text nil
-   "Non-nil means this is text that has been saved for later in `gud-filter'.")
- 
  ;; These functions are responsible for inserting output from your debugger
  ;; into the buffer.  The hard work is done by the method that is
  ;; the value of gud-marker-filter.
--- 2449,2454 ----
***************
*** 2516,2534 ****
              (gud-filter proc ""))))))
  
  (defvar gud-minor-mode-type nil)
  
  (defun gud-sentinel (proc msg)
    (cond ((null (buffer-name (process-buffer proc)))
         ;; buffer killed
         ;; Stop displaying an arrow in a source file.
!        (setq overlay-arrow-position nil)
         (set-process-buffer proc nil)
         (if (memq gud-minor-mode-type '(gdbmi gdba))
             (gdb-reset)
           (gud-reset)))
        ((memq (process-status proc) '(signal exit))
         ;; Stop displaying an arrow in a source file.
!        (setq overlay-arrow-position nil)
         (with-current-buffer gud-comint-buffer
           (if (memq gud-minor-mode-type '(gdbmi gdba))
               (gdb-reset)
--- 2517,2538 ----
              (gud-filter proc ""))))))
  
  (defvar gud-minor-mode-type nil)
+ (defvar gud-overlay-arrow-position nil)
+ (put 'gud-overlay-arrow-position 'overlay-arrow-string "=>")
+ (add-to-list 'overlay-arrow-variable-list 'gud-overlay-arrow-position)
  
  (defun gud-sentinel (proc msg)
    (cond ((null (buffer-name (process-buffer proc)))
         ;; buffer killed
         ;; Stop displaying an arrow in a source file.
!        (setq gud-overlay-arrow-position nil)
         (set-process-buffer proc nil)
         (if (memq gud-minor-mode-type '(gdbmi gdba))
             (gdb-reset)
           (gud-reset)))
        ((memq (process-status proc) '(signal exit))
         ;; Stop displaying an arrow in a source file.
!        (setq gud-overlay-arrow-position nil)
         (with-current-buffer gud-comint-buffer
           (if (memq gud-minor-mode-type '(gdbmi gdba))
               (gdb-reset)
***************
*** 2611,2623 ****
              (goto-line line)
              (setq pos (point))
              (setq overlay-arrow-string "=>")
!             (or overlay-arrow-position
!                 (setq overlay-arrow-position (make-marker)))
!             (set-marker overlay-arrow-position (point) (current-buffer)))
            (cond ((or (< pos (point-min)) (> pos (point-max)))
                   (widen)
                   (goto-char pos))))
!         (if window (set-window-point window overlay-arrow-position))))))
  
  ;; The gud-call function must do the right thing whether its invoking
  ;; keystroke is from the GUD buffer itself (via major-mode binding)
--- 2615,2627 ----
              (goto-line line)
              (setq pos (point))
              (setq overlay-arrow-string "=>")
!             (or gud-overlay-arrow-position
!                 (setq gud-overlay-arrow-position (make-marker)))
!             (set-marker gud-overlay-arrow-position (point) (current-buffer)))
            (cond ((or (< pos (point-min)) (> pos (point-max)))
                   (widen)
                   (goto-char pos))))
!         (if window (set-window-point window gud-overlay-arrow-position))))))
  
  ;; The gud-call function must do the right thing whether its invoking
  ;; keystroke is from the GUD buffer itself (via major-mode binding)




reply via email to

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