r13 - 29 Mar 2007 - 09:23:32 - SteffenSchwigonYou are here: TWiki >  Renormalist Web > CPerlMode

cperl-mode - (X)Emacs major mode for editing Perl(6) files

I started modifying cperl-mode (an Emacs mode for editing Perl files) to recognize Perl6 syntax. Initially I forked it as cperl6-mode to make it not interfere with existing cperl-mode based on v4.35. It's now reintegrated into cperl-mode.el based on its version 5.xx.

I contributed my modified cperl-mode.el to the Pugs project:

Usage

You probably don't want to overwrite your system's cperl-mode.el. So put the file cperl-mode.el somewhere into your personal load path that is searched before default load path, e.g. via:

(setq load-path
      (append
       (list
         (expand-file-name "~/local/lisp"))
       load-path))

Parsing Perl6 syntax can be activated via one of the following ways:

  • filename suffix is .p6
  • There is the following perl pragma near the beginning of the file (first 320 chars):
use v6;
  • You write this line at the beginning of your file:
### -*- cperl-use-v6: t; -*-
  • You write this somewhere in your file:
### Local Variables:
### cperl-use-v6: t
### End:

To use the Pugs coding guidelines, use this in your emacs config file:

(add-hook 'cperl-mode-hook
          '(lambda ()
             (cperl-set-style "Pugs")))


Please, please, please, give me feedback whether you use my modified cperl-mode and/or send me syntax snippets that do not yet correctly highlight/indent, with a description how it should behave.

Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r13 < r12 < r11 < r10 < r9 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback