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.