File: cperl-mode.el.html
This version of the file contains support for the syntax added by the MooseX::Declare CPAN module, as well as Perl 5.10 keyword support.
You can either fine-tune the bells and whistles of this mode or bulk enable them by putting
(setq cperl-hairy t)
in your .emacs file. (Emacs rulers do not consider it politically correct to make whistles enabled by default.)
DO NOT FORGET to read micro-docs (available from Perl menu) <<<<<<
or as help on variables cperl-tips, cperl-problems, <<<<<<
cperl-praise, cperl-speed. <<<<<<
Or search for "Short extra-docs" further down in this file for
details on how to use cperl-mode instead of perl-mode and lots
of other details.
The mode information (on C-h m) provides some customization help.
Faces used now: three faces for first-class and second-class keywords and control flow words, one for each: comments, string, labels, functions definitions and packages, arrays, hashes, and variable definitions. If you do not see all these faces, your font-lock does not define them, so you need to define them manually.
This mode supports font-lock, imenu and mode-compile. In the hairy version font-lock is on, but you should activate imenu yourself (note that mode-compile is not standard yet). Well, you can use imenu from keyboard anyway (M-x imenu), but it is better to bind it like that:
(define-key global-map [M-S-down-mouse-3] 'imenu)
Defined variables (118)
cperl--basic-identifier-rx | A regular expression for the name of a "basic" Perl variable. |
cperl--block-declaration-rx | A regular expression to find a declaration for a named block. |
cperl--eol-comment-rx | Regular expression for a single end-of-line comment in Perl |
cperl--false-label-rx | A regular expression which is similar to a label, but might as |
cperl--imenu-entries-rx | A regular expression to collect stuff that goes into the ‘imenu’ index. |
cperl--label-rx | A regular expression for a Perl label. |
cperl--normal-identifier-rx | A regular expression for a Perl variable name with optional namespace. |
cperl--package-for-imenu-rx | A regular expression to collect package names for ‘imenu’. |
cperl--package-rx | A regular expression for package NAME VERSION in Perl. |
cperl--pod-heading-rx | A regular expression to detect a POD heading. |
cperl--special-identifier-rx | The list of Perl "punctuation" variables, as listed in perlvar. |
cperl--sub-name-for-imenu-rx | A regular expression to detect a subroutine start. |
cperl--version-regexp | A sequence for recommended version number schemes in Perl. |
cperl--ws*-rx | Regular expression for optional whitespaces or comments in Perl |
cperl--ws+-rx | Regular expression for a sequence of whitespace and comments in Perl. |
cperl--ws-or-comment-rx | A regular expression for either whitespace or comment |
cperl--ws-rx | Regular expression for a single whitespace in Perl. |
cperl-auto-newline | Non-nil means automatically newline before and after braces, |
cperl-auto-newline-after-colon | Non-nil means automatically newline even after colons. |
cperl-autoindent-on-semi | Non-nil means automatically indent after insertion of (semi)colon. |
cperl-bad-style-regexp | Finds places such that insertion of a whitespace may help a lot. |
cperl-brace-imaginary-offset | Imagined indentation of a Perl open brace that actually follows a statement. |
cperl-brace-offset | Extra indentation for braces, compared with other text in same context. |
cperl-break-one-line-blocks-when-indent | Non-nil means that one-line if/unless/while/until/for/foreach BLOCKs |
cperl-clobber-lisp-bindings | Not-nil (and non-null) means not overwrite C-h f. |
cperl-close-paren-offset | Extra indent for substatements that start with close-parenthesis. |
cperl-comment-column | Column to put comments in CPerl (use M-x cperl-indent to lineup with code). |
cperl-compilation-error-regexp-list | List that specifies how to match errors in Perl output. |
cperl-continued-brace-offset | Extra indent for substatements that start with open-braces. |
cperl-continued-statement-offset | Extra indent for lines not starting new statements. |
cperl-del-back-ch | Character generated by key bound to ‘delete-backward-char’. |
cperl-do-not-fontify | Text property which inhibits refontification. |
cperl-doc-buffer | Where the documentation can be found. |
cperl-electric-backspace-untabify | Not-nil means electric-backspace will untabify in CPerl. |
cperl-electric-keywords | Not-nil (and non-null) means keywords are electric in CPerl. |
cperl-electric-lbrace-space | Non-nil (and non-null) means { after $ should be preceded by ‘ ’. |
cperl-electric-linefeed | If true, LFD should be hairy in CPerl, otherwise C-c LFD is hairy. |
cperl-electric-parens | Non-nil (and non-null) means parentheses should be electric in CPerl. |
cperl-electric-parens-mark | Not-nil means that electric parens look for active mark. |
cperl-electric-parens-string | String of parentheses that should be electric in CPerl. |
cperl-extra-newline-before-brace | Non-nil means that if, elsif, while, until, else, for, foreach |
cperl-extra-newline-before-brace-multiline | Non-nil means the same as ‘cperl-extra-newline-before-brace’, but |
cperl-extra-perl-args | Extra arguments to use when starting Perl. |
cperl-fix-hanging-brace-when-indent | Non-nil means that BLOCK-end ‘}’ may be put on a separate line |
cperl-font-lock | Non-nil (and non-null) means CPerl buffers will use ‘font-lock-mode’. |
cperl-font-lock-keywords | Additional expressions to highlight in Perl mode. Default set. |
cperl-font-lock-keywords-1 | Additional expressions to highlight in Perl mode. Minimal set. |
cperl-font-lock-keywords-2 | Additional expressions to highlight in Perl mode. Maximal set. |
cperl-fontify-m-as-s | Not-nil means highlight 1arg regular expressions operators same as 2arg. |
cperl-hairy | Not-nil means most of the bells and whistles are enabled in CPerl. |
cperl-have-help-regexp | Matches places in the buffer we can find help for. |
cperl-help-shown | Non-nil means that the help was already shown now. |
cperl-here-doc-functions | List of keywords after which ‘$var <<bareword’ is a here-document. |
cperl-here-face | Face for here-docs highlighting. |
cperl-hierarchy | Global hierarchy of classes. |
cperl-highlight-variables-indiscriminately | Non-nil means perform additional highlighting on variables. |
cperl-hook-after-change | Not-nil means install hook to know which regions of buffer are changed. |
cperl-indent-comment-at-column-0 | Non-nil means that comment started at column 0 should be indentable. |
cperl-indent-left-aligned-comments | Non-nil means that the comment starting in leftmost column should indent. |
cperl-indent-level | Indentation of CPerl statements with respect to containing block. |
cperl-indent-parens-as-block | Non-nil means that non-block ()-, {}- and []-groups are indented as blocks, |
cperl-indent-region-fix-constructs | Amount of space to insert between ‘}’ and ‘else’ or ‘elsif’. |
cperl-indent-rules-alist | Alist of indentation rules for CPerl mode. |
cperl-indent-subs-specially | If non-nil, indent subs inside other blocks relative to "sub" keyword. |
cperl-indent-wrt-brace | Non-nil means indent statements in if/etc block relative brace, not if/etc. |
cperl-info-on-command-no-prompt | Not-nil (and non-null) means not to prompt on M-x cperl-info-on-command. |
cperl-info-page | Name of the Info manual containing perl docs. |
cperl-invalid-face | Face for highlighting trailing whitespace. |
cperl-label-offset | Offset of CPerl label lines relative to usual indentation. |
cperl-lazy-help-time | Not-nil (and non-null) means to show lazy help after given idle time. |
cperl-lazy-installed | Non-nil means that the lazy-help handlers are installed now. |
cperl-lineup-step | ‘cperl-lineup’ will always lineup at multiple of this number. |
cperl-max-help-size | Non-nil means shrink-wrapping of info-buffer allowed up to these percents. |
cperl-maybe-white-and-comment-rex | Regular expression to match optional whitespace with interspersed comments. |
cperl-menu | Menu for CPerl mode. |
cperl-merge-trailing-else | Non-nil means that BLOCK-end ‘}’ followed by else/elsif/continue |
cperl-message-electric-keyword | Non-nil means that the ‘cperl-electric-keyword’ prints a help message. |
cperl-min-label-indent | Minimal offset of CPerl label lines. |
cperl-mode-abbrev-table | Abbrev table in use in CPerl mode buffers. |
cperl-mode-electric-keywords-abbrev-table | Abbrev table for electric keywords. Controlled by ‘cperl-electric-keywords’. |
cperl-mode-hook | Hook run by CPerl mode. |
cperl-mode-map | Keymap used in CPerl mode. |
cperl-mode-syntax-table | Syntax table in use in CPerl mode buffers. |
cperl-noscan-files-regexp | Regexp to match files/dirs to skip when generating TAGS. |
cperl-not-bad-style-regexp | If matches at the start of match found by ‘my-bad-c-style-regexp’, |
cperl-outline-regexp | The regular expression used for ‘outline-minor-mode’. |
cperl-pod-face | Face for POD highlighting. |
cperl-pod-head-face | Face for POD highlighting. |
cperl-pod-here-fontify | Not-nil after evaluation means to highlight POD and here-docs sections. |
cperl-pod-here-scan | Not-nil means look for POD and here-docs sections during startup. |
cperl-praise | Advantages of CPerl mode. |
cperl-problems | Description of problems in CPerl mode. |
cperl-problems-old-emaxen | This used to contain a description of problems in CPerl mode |
cperl-ps-print-face-properties | List given as an argument to ‘ps-extend-face-list’ in ‘cperl-ps-print’. |
cperl-regexp-indent-step | Indentation used when beautifying regexps. |
cperl-regexp-scan | Not-nil means make marking of regular expression more thorough. |
cperl-scan-files-regexp | Regexp to match files to scan when generating TAGS. |
cperl-short-docs | # based on '@(#)@ perl-descr.el 1.9 - describe-perl-symbol' [Perl 5] |
cperl-shrink-wrap-info-frame | Non-nil means shrink-wrapping of info-buffer-frame allowed. |
cperl-speed | This is an incomplete compendium of what is available in other parts |
cperl-string-syntax-table | Syntax table in use in CPerl mode string-like chunks. |
cperl-style-alist | List of variables to set to get a particular indentation style. |
cperl-style-examples | Examples of if/else with different indent styles (with v4.23). |
cperl-syntaxify-by-font-lock | Non-nil means that CPerl uses the ‘font-lock’ routines for syntaxification. |
cperl-syntaxify-for-menu | Non-nil means that CPerl syntaxifies up to the point before showing menu. |
cperl-syntaxify-unwind | Non-nil means that CPerl unwinds to a start of a long construction |
cperl-tab-always-indent | Non-nil means TAB in CPerl mode should always reindent the current line, |
cperl-tags-file-name | TAGS file name to use in ‘cperl-write-tags’. |
cperl-tips | Note that to enable Compile choices in the menu you need to install |
cperl-tips-faces | CPerl mode uses following faces for highlighting: |
cperl-under-as-char | Non-nil means that the _ (underline) should be treated as word char. |
cperl-use-syntax-table-text-property | Non-nil means CPerl sets up and uses ‘syntax-table’ text property. |
cperl-use-syntax-table-text-property-for-tags | Non-nil means: set up and use ‘syntax-table’ text property generating TAGS. |
cperl-vc-rcs-header | Special version of ‘vc-rcs-header’ that is used in CPerl mode buffers. |
cperl-vc-sccs-header | Special version of ‘vc-sccs-header’ that is used in CPerl mode buffers. |
cperl-version | Version of IZ-supported CPerl package this file is based on. |
cperl-white-and-comment-rex | Regular expression to match whitespace with interspersed comments. |
pod2man-program | File name for ‘pod2man’. |
Defined functions (134)
Defined faces (3)
cperl-array-face | Font Lock mode face used to highlight array names. |
cperl-hash-face | Font Lock mode face used to highlight hash names. |
cperl-nonoverridable-face | Font Lock mode face used non-overridable keywords and modifiers of regexps. |