File: cperl-mode.el.html
You can either fine-tune the bells and whistles of this mode or bulk enable them by putting this in your Init file:
(setq cperl-hairy t)
DO NOT FORGET to read micro-docs (available from Perl menu) <<<<<<
or as help on variables cperl-tips, 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: 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.
This mode supports imenu. You can use imenu from the keyboard
(M-g i), but you might prefer binding it like this:
(define-key global-map [M-S-down-mouse-3] #'imenu)
This version supports the syntax added by the MooseX::Declare CPAN module, as well as Perl 5.10 keywords.
Defined variables (136)
cperl--attribute-list-rx | A regular expression for an attribute list. |
cperl--basic-array-rx | Regular expression for an array variable (without package). |
cperl--basic-hash-rx | Regular expression for a hash variable (without package). |
cperl--basic-identifier-rx | A regular expression for the name of a "basic" Perl variable. |
cperl--basic-scalar-rx | Regular expression for a scalar (without package). |
cperl--basic-variable-rx | Regular expression for a Perl variable (scalar, array or hash). |
cperl--block-declaration-rx | A regular expression to find a declaration for a named block. |
cperl--class-for-imenu-rx | A regular expression to collect package names for ‘imenu’. |
cperl--eol-comment-rx | Regular expression for a single end-of-line comment in Perl |
cperl--extra-paired-delimiters | Full list of paired delimiters for quote-like constructs. |
cperl--false-label-rx | A regular expression which is similar to a label, but might as |
cperl--field-declaration-rx | A regular expression to find a declaration for a field. |
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|class NAME VERSION in Perl. |
cperl--pod-heading-rx | A regular expression to detect a POD heading. |
cperl--prototype-rx | A regular expression for a subroutine prototype. Not as strict |
cperl--signature-rx | A rx sequence subroutine signature without initializers. |
cperl--single-attribute-rx | A regular expression for a single attribute, without leading colon. |
cperl--sloppy-signature-rx | A rx sequence for the begin of a signature with initializers. |
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 or method start. |
cperl--sub-name-generated-rx | A regular expression to capture autogenerated reader methods. |
cperl--variable-list-rx | Regular expression for a list of Perl variables for declarations. |
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-paired-delimiters-mode | Non-nil if Cperl-Extra-Paired-Delimiters mode is enabled. |
cperl-extra-paired-delimiters-mode-hook | Hook run after entering or leaving ‘cperl-extra-paired-delimiters-mode’. |
cperl-file-style | Indentation style to use in ‘cperl-mode’. |
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-fontify-trailer | How to fontify text after an "__END__" or "__DATA__" token. |
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-pod2man-program | File name for ‘pod2man’. |
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 | If your Emacs does not default to ‘cperl-mode’ on Perl files, and you |
cperl-tips-faces | CPerl mode uses the 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 (135)
Defined faces (4)
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-method-call | Font Lock mode face for method calls. Usually, method calls are not fontified. We use this face to prevent calls to methods which look like builtin functions to be fontified like, well, builtin functions (which they are not). Inherits from ‘default’. |
cperl-nonoverridable-face | Font Lock mode face used non-overridable keywords and modifiers of regexps. |