aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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