0

After compilation of perl script I get syntax error in compilation window. If I try to use Goto Error Command, it not working and show error message:

Wrong type argument: listp, "^\\s-*\\(at \\(.*\\):\\([0-9]+\\)\)"

I use cperl 6.2 and xemacs 21.5.34.

serenesat
  • 4,611
  • 10
  • 37
  • 53
Gerd
  • 2,265
  • 1
  • 27
  • 46
  • 1
    This doesn't answer your question, but I *strongly* recommend moving from XEmacs to GNU Emacs. XEmacs is largely abandoned. Its website hasn't been updated in two years, and the most recent commit to its "bleeding edge" Mercurial repository, listed as official on its website, is a year and a half older than that. In the meantime, GNU Emacs has surpassed XEmacs in virtually every way. It's hard to overstate the improvements we've seen in the last few releases. The GNU Emacs community is dramatically larger as well, so you're much more likely to get useful help. – ChrisGPT was on strike Mar 18 '15 at 12:34
  • Ok. I change to GNU Emacs. How can I enable perl syntax check? I run cperl but syntax check is disabled? – Gerd Mar 18 '15 at 13:29

1 Answers1

1

I change to GNU Emacs. How can I enable perl syntax check? I run cperl but syntax check is disabled?

CPerl's "Check syntax" menu item relies on something called mode-compile. If you don't have that installed it won't work. I've never used mode-compile, and can't offer much help there.

If you're going to be installing another package for syntax checking anyway, and assuming you're using GNU Emacs 24 or later, I suggest using the excellent Flycheck instead. Flycheck supports syntax checking for Perl as well as a huge number of other languages. In addition to regular syntax checking using the perl binary, Flycheck also supports syntax checking using Perl::Critic.

Flycheck is available via MELPA and MELPA stable. Once it is installed, add

(global-flycheck-mode)

to your configuration to enable Flycheck globally. If you've got perl on your path you should start getting syntax checking.

ChrisGPT was on strike
  • 127,765
  • 105
  • 273
  • 257