aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann1999-11-01 21:10:27 +0000
committerGerd Moellmann1999-11-01 21:10:27 +0000
commitf2eb772dca330671a1f88847f0ce8d64e5b5c6ca (patch)
tree245af8e160f215ed78d1c8799c55183e039c82be
parent6c1aa34da0d29a6471cf9de13f77081c92b127dc (diff)
downloademacs-f2eb772dca330671a1f88847f0ce8d64e5b5c6ca.tar.gz
emacs-f2eb772dca330671a1f88847f0ce8d64e5b5c6ca.zip
(gud-perldb-massage-args): Massage correctly in the
presence of perl switches other than "-e".
-rw-r--r--lisp/gud.el27
1 files changed, 20 insertions, 7 deletions
diff --git a/lisp/gud.el b/lisp/gud.el
index edf4d028f05..036515176ae 100644
--- a/lisp/gud.el
+++ b/lisp/gud.el
@@ -1185,13 +1185,26 @@ directories if your program contains sources from more than one directory."
1185(defvar gud-perldb-history nil) 1185(defvar gud-perldb-history nil)
1186 1186
1187(defun gud-perldb-massage-args (file args) 1187(defun gud-perldb-massage-args (file args)
1188 (cond ((equal (car args) "-e") 1188 (let (new-args)
1189 (cons "-d" 1189
1190 (cons (car args) 1190 (while (and args
1191 (cons (nth 1 args) 1191 (string-match "^-[^-]" (car args)))
1192 (cons "--" (cons "-emacs" (cdr (cdr args)))))))) 1192 (setq new-args (cons (car args) new-args))
1193 (t 1193 (setq args (cdr args)))
1194 (cons "-d" (cons (car args) (cons "-emacs" (cdr args))))))) 1194
1195 (if args
1196 (progn
1197 (setq new-args (cons (car args) new-args))
1198 (setq args (cdr args)))
1199 (setq new-args (cons "--" new-args)))
1200
1201 (setq new-args (cons "-emacs" new-args))
1202
1203 (while args
1204 (setq new-args (cons (car args) new-args))
1205 (setq args (cdr args)))
1206
1207 (cons "-d" (nreverse new-args))))
1195 1208
1196;; There's no guarantee that Emacs will hand the filter the entire 1209;; There's no guarantee that Emacs will hand the filter the entire
1197;; marker at once; it could be broken up across several strings. We 1210;; marker at once; it could be broken up across several strings. We