[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 16ec99702c: gud.el: invoke 'perldb' with '-E' instead of '-e'
From: |
Harald Jörg |
Subject: |
master 16ec99702c: gud.el: invoke 'perldb' with '-E' instead of '-e' |
Date: |
Fri, 12 Aug 2022 11:29:57 -0400 (EDT) |
branch: master
commit 16ec99702c9a785e9c3cbded60b2b920b01d488b
Author: Harald Jörg <haj@posteo.de>
Commit: Harald Jörg <haj@posteo.de>
gud.el: invoke 'perldb' with '-E' instead of '-e'
* lisp/progmodes/gud.el (gud-perldb-massage-args): Allow '-E' switch
and use it as a default in favor of '-e'
* etc/NEWS ('perldb' now recognizes '-E') New entry in section 'Gud'
---
etc/NEWS | 6 ++++++
lisp/progmodes/gud.el | 13 +++++++------
2 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/etc/NEWS b/etc/NEWS
index 2747cec18c..be647f6bbb 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1250,6 +1250,12 @@ be used as a file-local variable.
If given a prefix, it will query the user for an argument to use for
the run/continue command.
+---
+*** 'perldb' now recognizes '-E'
+As of Perl 5.10, 'perl -E 0' behaves like 'perl -e 0' but also activates
+all optional features of the Perl version in use. 'perldb' now uses
+this invocation as its default.
+
** Customize
---
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index be43effed7..ccc5720575 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -1577,16 +1577,17 @@ into one that invokes an Emacs-enabled debugging
session.
(seen-e nil)
(shift (lambda () (push (pop args) new-args))))
- ;; Pass all switches and -e scripts through.
+ ;; Pass all switches and -E/-e scripts through.
(while (and args
(string-match "^-" (car args))
(not (equal "-" (car args)))
(not (equal "--" (car args))))
- (when (equal "-e" (car args))
+ (when (or (equal "-E" (car args)) (equal "-e" (car args)))
;; -e goes with the next arg, so shift one extra.
- (or (funcall shift)
- ;; -e as the last arg is an error in Perl.
- (error "No code specified for -e"))
+ (funcall shift)
+ (or args
+ ;; -E (or -e) as the last arg is an error in Perl.
+ (error "No code specified for %s" (car new-args)))
(setq seen-e t))
(funcall shift))
@@ -1697,7 +1698,7 @@ The directory containing the perl program becomes the
initial
working directory and source-file directory for your debugger."
(interactive
(list (gud-query-cmdline 'perldb
- (concat (or (buffer-file-name) "-e 0") " "))))
+ (concat (or (buffer-file-name) "-E 0") " "))))
(gud-common-init command-line 'gud-perldb-massage-args
'gud-perldb-marker-filter)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 16ec99702c: gud.el: invoke 'perldb' with '-E' instead of '-e',
Harald Jörg <=