]> git.eshelyaron.com Git - emacs.git/commitdiff
(gdb-goto-breakpoint): Use or instead of unless so nil isn't returned.
authorNick Roberts <nickrob@snap.net.nz>
Sat, 6 May 2006 00:34:11 +0000 (00:34 +0000)
committerNick Roberts <nickrob@snap.net.nz>
Sat, 6 May 2006 00:34:11 +0000 (00:34 +0000)
(gdb-setup-windows, gdb-restore-windows): Reset gdb-source-window.

lisp/progmodes/gdb-ui.el

index 28fcb70bb8bc00b7486db6f3069125dc13499399..19f6306b88a479ad135a043f6a48dc108d3c58e0 100644 (file)
@@ -1912,7 +1912,7 @@ static char *magick[] = {
            (let* ((buffer (find-file-noselect
                         (if (file-exists-p file) file
                           (cdr (assoc bptno gdb-location-alist)))))
-                  (window (unless (gdb-display-source-buffer buffer)
+                  (window (or (gdb-display-source-buffer buffer)
                               (display-buffer buffer))))
              (setq gdb-source-window window)
              (with-current-buffer buffer
@@ -2754,6 +2754,7 @@ corresponding to the mode line clicked."
           ;; Put buffer list in window if we
           ;; can't find a source file.
           (list-buffers-noselect))))
+  (setq gdb-source-window (selected-window))
   (when gdb-use-separate-io-buffer
     (split-window-horizontally)
     (other-window 1)
@@ -2781,6 +2782,7 @@ This arrangement depends on the value of `gdb-many-windows'."
        (if gud-last-last-frame
           (gud-find-file (car gud-last-last-frame))
         (gud-find-file gdb-main-file)))
+      (setq gdb-source-window (selected-window))
       (other-window 1))))
 
 (defun gdb-reset ()