]> code.delx.au - gnu-emacs/blobdiff - lisp/gud.el
(compilation-set-window-height): New function,
[gnu-emacs] / lisp / gud.el
index 5299774b41fbbc425cd28c5a057ded4e9e4fc909..bfb383d3bcdfdfbff4aac254b67df3cd076e62f1 100644 (file)
@@ -47,7 +47,7 @@
   "Prefix of all GUD commands valid in C buffers.")
 
 (global-set-key (concat gud-key-prefix "\C-l") 'gud-refresh)
-(global-set-key "\C-x " 'gud-break)    ;; backward compatibility hack
+(define-key ctl-x-map " " 'gud-break)  ;; backward compatibility hack
 
 ;; ======================================================================
 ;; the overloading mechanism
@@ -61,13 +61,13 @@ This association list has elements of the form
    gud-overload-alist))
 
 (defun gud-massage-args (file args)
-  (error "GUD not properly entered."))
+  (error "GUD not properly entered"))
 
 (defun gud-marker-filter (str)
-  (error "GUD not properly entered."))
+  (error "GUD not properly entered"))
 
 (defun gud-find-file (f)
-  (error "GUD not properly entered."))
+  (error "GUD not properly entered"))
 \f
 ;; ======================================================================
 ;; command definition
@@ -174,7 +174,7 @@ we're in the GUD buffer)."
     (let ((output ""))
 
       ;; Process all the complete markers in this chunk.
-      (while (string-match "^\032\032\\([^:\n]*\\):\\([0-9]*\\):.*\n"
+      (while (string-match "\032\032\\([^:\n]*\\):\\([0-9]*\\):.*\n"
                           gud-marker-acc)
        (setq
 
@@ -198,7 +198,7 @@ we're in the GUD buffer)."
       ;; gud-marker-acc until we receive the rest of it.  Since we
       ;; know the full marker regexp above failed, it's pretty simple to
       ;; test for marker starts.
-      (if (string-match "^\032.*\\'" gud-marker-acc)
+      (if (string-match "\032.*\\'" gud-marker-acc)
          (progn
            ;; Everything before the potential marker start can be output.
            (setq output (concat output (substring gud-marker-acc
@@ -404,7 +404,9 @@ and source-file directory for your debugger."
                               nil nil
                               '(gud-sdb-history . 1))))
   (if (and gud-sdb-needs-tags
-          (not (and (boundp 'tags-file-name) (file-exists-p tags-file-name))))
+          (not (and (boundp 'tags-file-name)
+                    (stringp tags-file-name)
+                    (file-exists-p tags-file-name))))
       (error "The sdb support requires a valid tags table to work."))
   (gud-overload-functions '((gud-massage-args . gud-sdb-massage-args)
                            (gud-marker-filter . gud-sdb-marker-filter)
@@ -457,7 +459,8 @@ and source-file directory for your debugger."
       ;; We haven't tested gud on this system:
       (string-match "^mips-[^-]*-riscos" system-configuration)
       ;; It's documented on OSF/1.3
-      (string-match "^mips-[^-]*-osf1" system-configuration))
+      (string-match "^mips-[^-]*-osf1" system-configuration)
+      (string-match "^alpha-[^-]*-osf" system-configuration))
   "Non-nil to assume the MIPS/OSF dbx conventions (argument `-emacs').")
 
 (defun gud-mipsdbx-massage-args (file args)
@@ -474,7 +477,7 @@ and source-file directory for your debugger."
       (while (string-match
              ;; This is like th gdb marker but with an optional
              ;; leading break point number like `[1] '
-             "^[][ 0-9]*\032\032\\([^:\n]*\\):\\([0-9]*\\):.*\n"
+             "[][ 0-9]*\032\032\\([^:\n]*\\):\\([0-9]*\\):.*\n"
              gud-marker-acc)
        (setq
 
@@ -498,7 +501,7 @@ and source-file directory for your debugger."
       ;; gud-marker-acc until we receive the rest of it.  Since we
       ;; know the full marker regexp above failed, it's pretty simple to
       ;; test for marker starts.
-      (if (string-match "^[][ 0-9]*\032.*\\'" gud-marker-acc)
+      (if (string-match "[][ 0-9]*\032.*\\'" gud-marker-acc)
          (progn
            ;; Everything before the potential marker start can be output.
            (setq output (concat output (substring gud-marker-acc
@@ -632,8 +635,8 @@ and source-file directory for your debugger."
     ;; Make dbx give out the source location info that we need.
     (process-send-string (get-buffer-process gud-comint-buffer)
                         "printf \"\032\032%1d:\",$curline;file\n"))
-   ((or (string-match "-sunos" (symbol-name system-type))
-       (string-match "-solaris" (symbol-name system-type)))
+   ((or (string-match "-sunos" system-configuration)
+       (string-match "-solaris" system-configuration))
     ;; The following works for both the UCB and SunPro 2.0.1 versions
     ;; of dbx.  The `stop' is lost using the `\n' separator as in the
     ;; default case.  Is there a dbx where the newline is actually
@@ -779,7 +782,7 @@ directories if your program contains sources from more than one directory."
     (let ((output ""))
 
       ;; Process all the complete markers in this chunk.
-      (while (string-match "^\032\032\\([^:\n]*\\):\\([0-9]*\\):.*\n"
+      (while (string-match "\032\032\\([^:\n]*\\):\\([0-9]*\\):.*\n"
                           gud-marker-acc)
        (setq
 
@@ -803,7 +806,7 @@ directories if your program contains sources from more than one directory."
       ;; gud-marker-acc until we receive the rest of it.  Since we
       ;; know the full marker regexp above failed, it's pretty simple to
       ;; test for marker starts.
-      (if (string-match "^\032.*\\'" gud-marker-acc)
+      (if (string-match "\032.*\\'" gud-marker-acc)
          (progn
            ;; Everything before the potential marker start can be output.
            (setq output (concat output (substring gud-marker-acc
@@ -1101,7 +1104,8 @@ Obeying it means displaying in another window the specified file and line."
 ;; to get around the fact that this is called inside a save-excursion.
 
 (defun gud-display-line (true-file line)
-  (let* ((buffer (gud-find-file true-file))
+  (let* ((last-nonmenu-event t)         ; Prevent use of dialog box for questions.
+        (buffer (gud-find-file true-file))
         (window (display-buffer buffer))
         (pos))
 ;;;    (if (equal buffer (current-buffer))