I'm running
* cperl-mode-4.26
* GNU Emacs 20.6.1 (i386-*-nt4.0.1381) of Mon Feb 28 2000 on buffy
* ActivePerl build 522 (aka perl version 5.005_03 built for
MSWin32-x86-object)
* NT4 SP6
and was unable to debug Perl within Emacs. I went to the NT Emacs FAQ,
and followed to
http://www.gnu.org/software/emacs/windows/ntemacs/discuss/perldb
which appears to have the same text as the revised FAQ at
http://www.tardis.ed.ac.uk/~skx/faq/ntemacs9.html#perldb
Both contain two posts. The first, from Jay Rogers <[EMAIL PROTECTED]>,
refers to older versions of Emacs and Perl. The second, from Doug
Campbell <[EMAIL PROTECTED]> on 29 Jul 1997, entitled, describes a
two-part process to make perldb play nice with NT Emacs via gud. Part
0 is a patch to perl5db.pl, which I applied, and part 1 is elisp to
add to .emacs, which I also did. Upon restarting Emacs, loading the
file, and running M-x better-perldb as instructed, I got
<snip>
> Unquoted string "macs" may clash with future reserved word at -e
> line 1.
> Cannot print stack trace, load with -MCarp option to see stack at
> c:/Perls/ActivePerl522/lib/perl5db.pl line 1930.
> Useless use of a constant in void context at -e line 1.
> Cannot print stack trace, load with -MCarp option to see stack at
> c:/Perls/ActivePerl522/lib/perl5db.pl line 1930.
> main::(-e:1): macs
> DB<1>
The conjunction of "-e" and "macs" seemed suspicious. I looked at
Campbell's elisp, and sure enough, it has
> (cons gud-perldb-interp-flags (cons (car args) (cons "-emacs" (cdr
args)))))
I changed that to
> (cons gud-perldb-interp-flags (cons (car args) (cons "-Demacs" (cdr
args)))))
And now it works! (Who says you need to know elisp to tweak Emacs !-)
So now I'd like to ask:
0 Does anyone have "a better way" to run perldb under Emacs on NT?
1 Is the above change likely to break anything else?
2 If not, can this change be incorporated into the existing or revised
FAQs?
3 I'd like to better incorporate Campbell's better-perldb into
cperl-mode such that, if I do M-x compile with a compile-command
containing -\w+d (or whatever the correct regexp should be :-), it
would run Campbell's way. Is there a way to do this?
4 I'd also like to have better-perldb (or its constituent code) use
compile-command. I tried
> ;; Fix for perldb - make default reasonable and allow no-prompt
option
> (defun better-perldb (&optional arg)
> "Runs perldb with better handling of default command string.
> With arg true, doesn't prompt for new command, uses last one."
> (interactive)
> (if (not (null arg))
> (perldb (car gud-perldb-history))
> (perldb (read-from-minibuffer
> "Run perldb (like this): "
> (if (and (consp gud-perldb-history)
> (string-match
> (concat "^ *[^ ]+ +" (buffer-file-name))
> (car gud-perldb-history)))
> (car gud-perldb-history)
-> ; TLR: make it use compile-command
-> ; (concat "perl " (buffer-file-name)))
-> (compile-command))
> nil nil
> '(gud-perldb-history . 1)))))
which gets the (minibuffer) error
> Symbol's function definition is void: compile-command
despite the fact that compile-command is set by local variables, and
M-x compile uses it without problem. What's the right way to do this?
Please reply directly to me as well as the list/group, and
TIA, [EMAIL PROTECTED]
---
You are currently subscribed to perl-win32-users as: [[email protected]]
To unsubscribe, forward this message to
[EMAIL PROTECTED]
For non-automated Mailing List support, send email to
[EMAIL PROTECTED]