diff lisp/gud.el @ 16327:2239440f2f00

(gud-perldb-massage-args): Handle -e in ARGS. (gud-perldb-marker-filter): Handle drive letters in file name. (perldb): Update comint-prompt-regexp for latest Perl. (gud-mode): Locally set comint-input-ignoredups to t.
author Richard M. Stallman <rms@gnu.org>
date Wed, 25 Sep 1996 07:17:18 +0000
parents aaa0ecdc4772
children 0a969fac6f65
line wrap: on
line diff
--- a/lisp/gud.el	Wed Sep 25 03:54:23 1996 +0000
+++ b/lisp/gud.el	Wed Sep 25 07:17:18 1996 +0000
@@ -928,7 +928,13 @@
 (defvar gud-perldb-history nil)
 
 (defun gud-perldb-massage-args (file args)
-  (cons "-d" (cons (car args) (cons "-emacs" (cdr args)))))
+  (cond ((equal (car args) "-e") 
+	 (cons "-d" 
+	       (cons (car args) 
+		     (cons (nth 1 args) 
+			   (cons "--" (cons "-emacs" (cdr (cdr args))))))))
+	(t
+	 (cons "-d" (cons (car args) (cons "-emacs" (cdr args)))))))
 
 ;; There's no guarantee that Emacs will hand the filter the entire
 ;; marker at once; it could be broken up across several strings.  We
@@ -943,7 +949,7 @@
   (let ((output ""))
 
     ;; Process all the complete markers in this chunk.
-    (while (string-match "\032\032\\([^:\n]*\\):\\([0-9]*\\):.*\n"
+    (while (string-match "\032\032\\(\\([a-zA-Z]:\\)?[^:\n]*\\):\\([0-9]*\\):.*\n"
 			 gud-marker-acc)
       (setq
 
@@ -951,8 +957,8 @@
        gud-last-frame
        (cons (substring gud-marker-acc (match-beginning 1) (match-end 1))
 	     (string-to-int (substring gud-marker-acc
-				       (match-beginning 2)
-				       (match-end 2))))
+				       (match-beginning 3)
+				       (match-end 3))))
 
        ;; Append any text before the marker to the output we're going
        ;; to return - we don't include the marker in this text.
@@ -1018,7 +1024,7 @@
 ;  (gud-def gud-down   "down %p"      ">" "Down N stack frames (numeric arg).")
   (gud-def gud-print  "%e"           "\C-p" "Evaluate perl expression at point.")
 
-  (setq comint-prompt-regexp "^  DB<[0-9]+> ")
+  (setq comint-prompt-regexp "^  DB<+[0-9]+>+ ")
   (setq paragraph-start comint-prompt-regexp)
   (run-hooks 'perldb-mode-hook)
   )
@@ -1136,6 +1142,9 @@
   (make-local-variable 'gud-last-frame)
   (setq gud-last-frame nil)
   (make-local-variable 'comint-prompt-regexp)
+  ;; Don't put repeated commands in command history many times.
+  (make-local-variable 'comint-input-ignoredups)
+  (setq comint-input-ignoredups t)
   (make-local-variable 'paragraph-start)
   (make-local-variable 'gud-delete-prompt-marker)
   (setq gud-delete-prompt-marker (make-marker))