mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-21 13:31:37 -07:00
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'
This commit is contained in:
parent
e0045ba2bc
commit
16ec99702c
2 changed files with 13 additions and 6 deletions
6
etc/NEWS
6
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
|
||||
|
||||
---
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue