Server IP : 111.118.215.189 / Your IP : 18.117.158.174 Web Server : Apache System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : a1673wkz ( 2475) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /usr/share/emacs/24.3/lisp/progmodes/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
;ELC ;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:09:22 2024 ;;; from file /builddir/build/BUILD/emacs-24.3/lisp/progmodes/cperl-mode.el ;;; in Emacs version 24.3.1 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defvar cperl-can-font-lock (byte-code "\302\301!\205 \206 \303V\207" [window-system emacs-major-version boundp 20] 2)) (defalias 'cperl-choose-color #[(&rest list) "\302 \203 \204 \303 @!\204 A\204 @ A\211\204 )\207" [answer list nil x-color-defined-p] 3]) (byte-code "\300\301\302\303\304\305\306\307\310\311& \210\300\312\302\313\304\305\306\301&\210\300\314\302\315\304\305\306\301&\210\300\316\302\317\304\305\306\301&\210\300\320\302\321\322\323\304\305\306\301& \210\300\324\302\325\304\305\306\301&\210\300\326\302\327\304\305\306\301&\210\330\331\302\332\333\334\306\316&\210\330\335\331\336\333\334\306\316&\210\330\337\340\341\333\342\306\312&\210\330\343\302\344\333\345\306\312&\210\330\346\347\350\333\342\306\312&\210\330\351\347\352\333\342\306\312&\210\330\353\354\355\333\342\306\312&\210\330\356\357\360\333\342\306\312&\210\330\361\340\362\333\342\306\312&\210\330\363\347\364\333\342\306\312&\210\330\365\366\367\333\342\306\312&\210\330\370\371\372\333\334\306\312&\210\330\373\302\374\333\334\306\316&\210\330\375\302\376\333\334\306\316&\210\330\377\302\201@ \333\334\306\316&\210\330\201A \371\201B \333\334\306\312&\210\330\201C \302\201D \333\201E \306\314&\210\330\201F \302\201G \333\201H \306\314&\210\330\201I \201J \201K \333\201L \306\314&\210\330\201M \302\201N \333\201O \306\314&\210\330\201P \201Q \201R \333\334\306\316&\210\330\201S \302\201T \333\201U \306\314&\210\330\201V \302\201W \333\201X \306\314&\210\330\201Y \371\201Z \333\334\306\316&\210\330\201[ \302\201\\ \333\334\306\314&\210\330\201] \201^ \201_ \333\342\306\312&\210\330\201` \302\201a \333\334\306\312&\210\330\201b \201c \201d \333\201e \306\301&\210\330\201f \201g \201h \333\201i \306\301&\207" [custom-declare-group cperl nil "Major mode for editing Perl code." :prefix "cperl-" :group languages :version "20.3" cperl-indentation-details "Indentation." cperl-affected-by-hairy "Variables affected by `cperl-hairy'." cperl-autoinsert-details "Auto-insert tuneup." cperl-faces "Fontification colors." :link (custom-group-link :tag "Font Lock Faces group" font-lock-faces) cperl-speed "Speed vs. validity tuneup." cperl-help-system "Help system tuneup." custom-declare-variable cperl-extra-newline-before-brace "*Non-nil means that if, elsif, while, until, else, for, foreach\nand do constructs look like:\n\n if ()\n {\n }\n\ninstead of:\n\n if () {\n }" :type boolean cperl-extra-newline-before-brace-multiline "*Non-nil means the same as `cperl-extra-newline-before-brace', but\nfor constructs with multiline if/unless/while/until/for/foreach condition." cperl-indent-level 2 "*Indentation of CPerl statements with respect to containing block." integer cperl-lineup-step "*`cperl-lineup' will always lineup at multiple of this number.\nIf nil, the value of `cperl-indent-level' will be used." (choice (const nil) integer) cperl-brace-imaginary-offset 0 "*Imagined indentation of a Perl open brace that actually follows a statement.\nAn open brace following other text is treated as if it were this far\nto the right of the start of its line." cperl-brace-offset "*Extra indentation for braces, compared with other text in same context." cperl-label-offset -2 "*Offset of CPerl label lines relative to usual indentation." cperl-min-label-indent 1 "*Minimal offset of CPerl label lines." cperl-continued-statement-offset "*Extra indent for lines not starting new statements." cperl-continued-brace-offset "*Extra indent for substatements that start with open-braces.\nThis is in addition to cperl-continued-statement-offset." cperl-close-paren-offset -1 "*Extra indent for substatements that start with close-parenthesis." cperl-indent-wrt-brace t "*Non-nil means indent statements in if/etc block relative brace, not if/etc.\nVersions 5.2 ... 5.20 behaved as if this were `nil'." cperl-auto-newline "*Non-nil means automatically newline before and after braces,\nand after colons and semicolons, inserted in CPerl code. The following\n\\[cperl-electric-backspace] will remove the inserted whitespace.\nInsertion after colons requires both this variable and\n`cperl-auto-newline-after-colon' set." cperl-autoindent-on-semi "*Non-nil means automatically indent after insertion of (semi)colon.\nActive if `cperl-auto-newline' is false." cperl-auto-newline-after-colon "*Non-nil means automatically newline even after colons.\nSubject to `cperl-auto-newline' setting." cperl-tab-always-indent "*Non-nil means TAB in CPerl mode should always reindent the current line,\nregardless of where in the line point is when the TAB command is used." cperl-font-lock "*Non-nil (and non-null) means CPerl buffers will use `font-lock-mode'.\nCan be overwritten by `cperl-hairy' if nil." (choice (const null) boolean) cperl-electric-lbrace-space "*Non-nil (and non-null) means { after $ should be preceded by ` '.\nCan be overwritten by `cperl-hairy' if nil." (choice (const null) boolean) cperl-electric-parens-string "({[]})<" "*String of parentheses that should be electric in CPerl.\nClosing ones are electric only if the region is highlighted." string cperl-electric-parens "*Non-nil (and non-null) means parentheses should be electric in CPerl.\nCan be overwritten by `cperl-hairy' if nil." (choice (const null) boolean) cperl-electric-parens-mark (and window-system (or (and (boundp 'transient-mark-mode) transient-mark-mode) (and (boundp 'zmacs-regions) zmacs-regions))) "*Not-nil means that electric parens look for active mark.\nDefault is yes if there is visual feedback on mark." cperl-electric-linefeed "*If true, LFD should be hairy in CPerl, otherwise C-c LFD is hairy.\nIn any case these two mean plain and hairy linefeeds together.\nCan be overwritten by `cperl-hairy' if nil." (choice (const null) boolean) cperl-electric-keywords "*Not-nil (and non-null) means keywords are electric in CPerl.\nCan be overwritten by `cperl-hairy' if nil.\n\nUses `abbrev-mode' to do the expansion. If you want to use your\nown abbrevs in cperl-mode, but do not want keywords to be\nelectric, you must redefine `cperl-mode-abbrev-table': do\n\\[edit-abbrevs], search for `cperl-mode-abbrev-table', and, in\nthat paragraph, delete the words that appear at the ends of lines and\nthat begin with \"cperl-electric\".\n" (choice (const null) boolean) cperl-electric-backspace-untabify "*Not-nil means electric-backspace will untabify in CPerl." cperl-hairy "*Not-nil means most of the bells and whistles are enabled in CPerl.\nAffects: `cperl-font-lock', `cperl-electric-lbrace-space',\n`cperl-electric-parens', `cperl-electric-linefeed', `cperl-electric-keywords',\n`cperl-info-on-command-no-prompt', `cperl-clobber-lisp-bindings',\n`cperl-lazy-help-time'." cperl-comment-column 32 "*Column to put comments in CPerl (use \\[cperl-indent] to lineup with code)." cperl-indent-comment-at-column-0 "*Non-nil means that comment started at column 0 should be indentable." cperl-vc-sccs-header '("($sccs) = ('%W%' =~ /(\\d+(\\.\\d+)+)/) ;") "*Special version of `vc-sccs-header' that is used in CPerl mode buffers." (repeat string) cperl-vc-rcs-header '("($rcs) = (' $Id$ ' =~ /(\\d+(\\.\\d+)+)/);") "*Special version of `vc-rcs-header' that is used in CPerl mode buffers." (repeat string)] 10) (defvar cperl-vc-header-alist nil) (byte-code "\300\301\302\303#\210\304\305\306\307\310\311\312\313&\210\304\314\315\316\310\317\312\320&\210\304\321\315\322\310\323\312\320&\210\304\324\315\325\310\326\312\320&\210\304\327\330\331\310\332\312\333&\210\304\334\335\336\310\332\312\333&\210\304\337\340\341\310\332\312\333&\207" [make-obsolete-variable cperl-vc-header-alist "use cperl-vc-rcs-header or cperl-vc-sccs-header instead." "22.1" custom-declare-variable cperl-clobber-mode-lists (not (and (boundp 'interpreter-mode-alist) (assoc "miniperl" interpreter-mode-alist) (assoc "\\.\\([pP][Llm]\\|al\\)$" auto-mode-alist))) "*Whether to install us into `interpreter-' and `extension' mode lists." :type boolean :group cperl cperl-info-on-command-no-prompt nil "*Not-nil (and non-null) means not to prompt on C-h f.\nThe opposite behavior is always available if prefixed with C-c.\nCan be overwritten by `cperl-hairy' if nil." (choice (const null) boolean) cperl-affected-by-hairy cperl-clobber-lisp-bindings "*Not-nil (and non-null) means not overwrite C-h f.\nThe function is available on \\[cperl-info-on-command], \\[cperl-get-help].\nCan be overwritten by `cperl-hairy' if nil." (choice (const null) boolean) cperl-lazy-help-time "*Not-nil (and non-null) means to show lazy help after given idle time.\nCan be overwritten by `cperl-hairy' to be 5 sec if nil." (choice (const null) (const nil) integer) cperl-pod-face 'font-lock-comment-face "*Face for POD highlighting." face cperl-faces cperl-pod-head-face 'font-lock-variable-name-face "*Face for POD highlighting.\nFont for POD headers." cperl-here-face 'font-lock-string-face "*Face for here-docs highlighting."] 8) (defvar cperl-singly-quote-face nil) (byte-code "\300\301\302\303\304\305\306\307\310\311& \210\300\312\313\314\304\315\310\311&\210\300\316\317\320\304\315\310\311&\210\300\321\322\323\304\315\310\324&\210\300\325\317\326\304\315\310\327&\210\300\330\317\331\304\315\310\327&\210\300\332\317\333\304\315\310\327&\210\300\334\322\335\304\315\310\336&\210\300\337\340\341\304\342\310\336&\210\300\343\317\344\304\315\310\336&\210\300\345\346\347\304\350\310\336&\210\300\351\352\353\304\315\310\327&\210\300\354\351\355\304\315\310\327&\210\300\356\357\360\304\361\310\324&\210\300\362\363\364\304\361\310\324&\210\300\365\322\366\304\367\310\370&\210\300\371\317\372\304\315\310\370&\210\300\373\322\374\304\315\310\324&\210\300\375\376\377\304\350\310\324&\210\300\201@ \317\201A \304\315\310\336&\210\300\201B \201C \201D \304\201E \310\370&\210\300\201F \317\201G \304\315\310\370&\210\300\201H \317\201I \304\315\310\370&\210\300\201J \317\201K \304\315\310\370&\210\300\201L \322\201M \304\315\310\370&\210\300\201N \201O \201P \304\201Q \310\327&\210\300\201R \317\201S \304\315\310\327&\210\300\201T \317\201U \304\315\310\327&\210\300\201V \201W \201X \304\201Y \310\311&\207" [custom-declare-variable cperl-invalid-face 'underline "*Face for highlighting trailing whitespace." :type face :version "21.1" :group cperl-faces cperl-pod-here-fontify '(featurep 'font-lock) "*Not-nil after evaluation means to highlight POD and here-docs sections." boolean cperl-fontify-m-as-s t "*Not-nil means highlight 1arg regular expressions operators same as 2arg." cperl-highlight-variables-indiscriminately nil "*Non-nil means perform additional highlighting on variables.\nCurrently only changes how scalar variables are highlighted.\nNote that that variable is only read at initialization time for\nthe variable `cperl-font-lock-keywords-2', so changing it after you've\nentered CPerl mode the first time will have no effect." cperl cperl-pod-here-scan "*Not-nil means look for POD and here-docs sections during startup.\nYou can always make lookup from menu or using \\[cperl-find-pods-heres]." cperl-speed cperl-regexp-scan "*Not-nil means make marking of regular expression more thorough.\nEffective only with `cperl-pod-here-scan'." cperl-hook-after-change "*Not-nil means install hook to know which regions of buffer are changed.\nMay significantly speed up delayed fontification. Changes take effect\nafter reload." cperl-imenu-addback "*Not-nil means add backreferences to generated `imenu's.\nMay require patched `imenu' and `imenu-go'. Obsolete." cperl-help-system cperl-max-help-size 66 "*Non-nil means shrink-wrapping of info-buffer allowed up to these percents." (choice integer (const nil)) cperl-shrink-wrap-info-frame "*Non-nil means shrink-wrapping of info-buffer-frame allowed." cperl-info-page "perl" "*Name of the info page containing perl docs.\nOlder version of this page was called `perl5', newer `perl'." string cperl-use-syntax-table-text-property (boundp 'parse-sexp-lookup-properties) "*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-scan-files-regexp "\\.\\([pP][Llm]\\|xs\\)$" "*Regexp to match files to scan when generating TAGS." regexp cperl-noscan-files-regexp "/\\(\\.\\.?\\|SCCS\\|RCS\\|CVS\\|blib\\)$" "*Regexp to match files/dirs to skip when generating TAGS." cperl-regexp-indent-step "*Indentation used when beautifying regexps.\nIf nil, the value of `cperl-indent-level' will be used." (choice integer (const nil)) cperl-indentation-details cperl-indent-left-aligned-comments "*Non-nil means that the comment starting in leftmost column should indent." cperl-under-as-char "*Non-nil means that the _ (underline) should be treated as word char." cperl-extra-perl-args "" "*Extra arguments to use when starting Perl.\nCurrently used with `cperl-check-syntax' only." cperl-message-electric-keyword "*Non-nil means that the `cperl-electric-keyword' prints a help message." cperl-indent-region-fix-constructs 1 "*Amount of space to insert between `}' and `else' or `elsif'\nin `cperl-indent-region'. Set to nil to leave as is. Values other\nthan 1 and nil will probably not work." (choice (const nil) (const 1)) cperl-break-one-line-blocks-when-indent "*Non-nil means that one-line if/unless/while/until/for/foreach BLOCKs\nneed to be reformatted into multiline ones when indenting a region." cperl-fix-hanging-brace-when-indent "*Non-nil means that BLOCK-end `}' may be put on a separate line\nwhen indenting a region.\nBraces followed by else/elsif/while/until are excepted." cperl-merge-trailing-else "*Non-nil means that BLOCK-end `}' followed by else/elsif/continue\nmay be merged to be on the same line when indenting a region." cperl-indent-parens-as-block "*Non-nil means that non-block ()-, {}- and []-groups are indented as blocks,\nbut for trailing \",\" inside the group, which won't increase indentation.\nOne should tune up `cperl-close-paren-offset' as well." cperl-syntaxify-by-font-lock (and cperl-can-font-lock (boundp 'parse-sexp-lookup-properties)) "*Non-nil means that CPerl uses the `font-lock' routines for syntaxification." (choice (const message) boolean) cperl-syntaxify-unwind "*Non-nil means that CPerl unwinds to a start of a long construction\nwhen syntaxifying a chunk of buffer." cperl-syntaxify-for-menu "*Non-nil means that CPerl syntaxifies up to the point before showing menu.\nThis way enabling/disabling of menu items is more correct." cperl-ps-print-face-properties '((font-lock-keyword-face nil nil bold shadow) (font-lock-variable-name-face nil nil bold) (font-lock-function-name-face nil nil bold italic box) (font-lock-constant-face nil "LightGray" bold) (cperl-array-face nil "LightGray" bold underline) (cperl-hash-face nil "LightGray" bold italic underline) (font-lock-comment-face nil "LightGray" italic) (font-lock-string-face nil nil italic underline) (cperl-nonoverridable-face nil nil italic underline) (font-lock-type-face nil nil underline) (font-lock-warning-face nil "LightGray" bold italic box) (underline nil "LightGray" strikeout)) "List given as an argument to `ps-extend-face-list' in `cperl-ps-print'." (repeat (cons symbol (cons (choice (const nil) string) (cons (choice (const nil) string) (repeat symbol)))))] 10) (defvar cperl-dark-background (cperl-choose-color "navy" "os2blue" "darkgreen")) (defvar cperl-dark-foreground (cperl-choose-color "orchid1" "orange")) (byte-code "\302\303\304\305\306\307\310DD\311BBBB\312\313\314%\210\302\315\316\317\320\321\310\322\323 \324BBBBD\325BBBB\326\313\314%\210\302\327\330\331\332\333\310\334\323 \335BBBBD\336BBBB\337\313\314%\207" [cperl-dark-foreground cperl-dark-background custom-declare-face cperl-nonoverridable-face (((class grayscale) (background light)) (:background "Gray90" :slant italic :underline t)) (((class grayscale) (background dark)) (:foreground "Gray80" :slant italic :underline t :weight bold)) (((class color) (background light)) (:foreground "chartreuse3")) ((class color) (background dark)) :foreground ((t (:weight bold :underline t))) "Font Lock mode face used non-overridable keywords and modifiers of regexps." :group cperl-faces cperl-array-face (((class grayscale) (background light)) (:background "Gray90" :weight bold)) (((class grayscale) (background dark)) (:foreground "Gray80" :weight bold)) (((class color) (background light)) (:foreground "Blue" :background "lightyellow2" :weight bold)) ((class color) (background dark)) "yellow" :background (:weight bold) ((t (:weight bold))) "Font Lock mode face used to highlight array names." cperl-hash-face (((class grayscale) (background light)) (:background "Gray90" :weight bold :slant italic)) (((class grayscale) (background dark)) (:foreground "Gray80" :weight bold :slant italic)) (((class color) (background light)) (:foreground "Red" :background "lightyellow2" :weight bold :slant italic)) ((class color) (background dark)) "Red" (:weight bold :slant italic) ((t (:weight bold :slant italic))) "Font Lock mode face used to highlight hash names."] 11) #@2206 Get maybe newer version of this package from http://ilyaz.org/software/emacs Subdirectory `cperl-mode' may contain yet newer development releases and/or patches to related files. For best results apply to an older Emacs the patches from ftp://ftp.math.ohio-state.edu/pub/users/ilya/cperl-mode/patches (this upgrades syntax-parsing abilities of Emacsen v19.34 and v20.2 up to the level of Emacs v20.3 - a must for a good Perl mode.) As of beginning of 2003, XEmacs may provide a similar ability. Get support packages choose-color.el (or font-lock-extra.el before 19.30), imenu-go.el from the same place. (Look for other files there too... ;-). Get a patch for imenu.el in 19.29. Note that for 19.30 and later you should use choose-color.el *instead* of font-lock-extra.el (and you will not get smart highlighting in C :-(). Note that to enable Compile choices in the menu you need to install mode-compile.el. If your Emacs does not default to `cperl-mode' on Perl files, and you want it to: put the following into your .emacs file: (defalias 'perl-mode 'cperl-mode) Get perl5-info from $CPAN/doc/manual/info/perl5-old/perl5-info.tar.gz Also, one can generate a newer documentation running `pod2texi' converter $CPAN/doc/manual/info/perl5/pod2texi-0.1.tar.gz If you use imenu-go, run imenu on perl5-info buffer (you can do it from Perl menu). If many files are related, generate TAGS files from Tools/Tags submenu in Perl menu. If some class structure is too complicated, use Tools/Hierarchy-view from Perl menu, or hierarchic view of imenu. The second one uses the current buffer only, the first one requires generation of TAGS from Perl/Tools/Tags menu beforehand. Run Perl/Tools/Insert-spaces-if-needed to fix your lazy typing. Switch auto-help on/off with Perl/Tools/Auto-help. Though with contemporary Emaxen CPerl mode should maintain the correct parsing of Perl even when editing, sometimes it may be lost. Fix this by \[normal-mode] In cases of more severe confusion sometimes it is helpful to do \[load-library] cperl-mode RET \[normal-mode] Before reporting (non-)problems look in the problem section of online micro-docs on what I know about CPerl problems. (defvar cperl-tips 'please-ignore-this-line (#$ . 17649)) #@535 Description of problems in CPerl mode. Some faces will not be shown on some versions of Emacs unless you install choose-color.el, available from http://ilyaz.org/software/emacs `fill-paragraph' on a comment may leave the point behind the paragraph. It also triggers a bug in some versions of Emacs (CPerl tries to detect it and bulk out). See documentation of a variable `cperl-problems-old-emaxen' for the problems which disappear if you upgrade Emacs to a reasonably new version (20.3 for Emacs, and those of 2004 for XEmacs). (defvar cperl-problems 'please-ignore-this-line (#$ . 19919)) #@2110 Description of problems in CPerl mode specific for older Emacs versions. Emacs had a _very_ restricted syntax parsing engine until version 20.1. Most problems below are corrected starting from this version of Emacs, and all of them should be fixed in version 20.3. (Or apply patches to Emacs 19.33/34 - see tips.) XEmacs was very backward in this respect (until 2003). Note that even with newer Emacsen in some very rare cases the details of interaction of `font-lock' and syntaxification may be not cleaned up yet. You may get slightly different colors basing on the order of fontification and syntaxification. Say, the initial faces is correct, but editing the buffer breaks this. Even with older Emacsen CPerl mode tries to corrects some Emacs misunderstandings, however, for efficiency reasons the degree of correction is different for different operations. The partially corrected problems are: POD sections, here-documents, regexps. The operations are: highlighting, indentation, electric keywords, electric braces. This may be confusing, since the regexp s#//#/#; may be highlighted as a comment, but it will be recognized as a regexp by the indentation code. Or the opposite case, when a POD section is highlighted, but may break the indentation of the following code (though indentation should work if the balance of delimiters is not broken by POD). The main trick (to make $ a "backslash") makes constructions like ${aaa} look like unbalanced braces. The only trick I can think of is to insert it as $ {aaa} (valid in perl5, not in perl4). Similar problems arise in regexps, when /(\s|$)/ should be rewritten as /($|\s)/. Note that such a transposition is not always possible. The solution is to upgrade your Emacs or patch an older one. Note that Emacs 20.2 has some bugs related to `syntax-table' text properties. Patches are available on the main CPerl download site, and on CPAN. If these bugs cannot be fixed on your machine (say, you have an inferior environment and cannot recompile), you may still disable all the fancy stuff via `cperl-use-syntax-table-text-property'. (defvar cperl-problems-old-emaxen 'please-ignore-this-line (#$ . 20523)) #@4340 Advantages of CPerl mode. 0) It uses the newest `syntax-table' property ;-); 1) It does 99% of Perl syntax correct (as opposed to 80-90% in Perl mode - but the latter number may have improved too in last years) even with old Emaxen which do not support `syntax-table' property. When using `syntax-table' property for syntax assist hints, it should handle 99.995% of lines correct - or somesuch. It automatically updates syntax assist hints when you edit your script. 2) It is generally believed to be "the most user-friendly Emacs package" whatever it may mean (I doubt that the people who say similar things tried _all_ the rest of Emacs ;-), but this was not a lonely voice); 3) Everything is customizable, one-by-one or in a big sweep; 4) It has many easily-accessible "tools": a) Can run program, check syntax, start debugger; b) Can lineup vertically "middles" of rows, like `=' in a = b; cc = d; c) Can insert spaces where this improves readability (in one interactive sweep over the buffer); d) Has support for imenu, including: 1) Separate unordered list of "interesting places"; 2) Separate TOC of POD sections; 3) Separate list of packages; 4) Hierarchical view of methods in (sub)packages; 5) and functions (by the full name - with package); e) Has an interface to INFO docs for Perl; The interface is very flexible, including shrink-wrapping of documentation buffer/frame; f) Has a builtin list of one-line explanations for perl constructs. g) Can show these explanations if you stay long enough at the corresponding place (or on demand); h) Has an enhanced fontification (using 3 or 4 additional faces comparing to font-lock - basically, different namespaces in Perl have different colors); i) Can construct TAGS basing on its knowledge of Perl syntax, the standard menu has 6 different way to generate TAGS (if "by directory", .xs files - with C-language bindings - are included in the scan); j) Can build a hierarchical view of classes (via imenu) basing on generated TAGS file; k) Has electric parentheses, electric newlines, uses Abbrev for electric logical constructs while () {} with different styles of expansion (context sensitive to be not so bothering). Electric parentheses behave "as they should" in a presence of a visible region. l) Changes msb.el "on the fly" to insert a group "Perl files"; m) Can convert from if (A) { B } to B if A; n) Highlights (by user-choice) either 3-delimiters constructs (such as tr/a/b/), or regular expressions and `y/tr'; o) Highlights trailing whitespace; p) Is able to manipulate Perl Regular Expressions to ease conversion to a more readable form. q) Can ispell POD sections and HERE-DOCs. r) Understands comments and character classes inside regular expressions; can find matching () and [] in a regular expression. s) Allows indentation of //x-style regular expressions; t) Highlights different symbols in regular expressions according to their function; much less problems with backslashitis; u) Allows to find regular expressions which contain interpolated parts. 5) The indentation engine was very smart, but most of tricks may be not needed anymore with the support for `syntax-table' property. Has progress indicator for indentation (with `imenu' loaded). 6) Indent-region improves inline-comments as well; also corrects whitespace *inside* the conditional/loop constructs. 7) Fill-paragraph correctly handles multi-line comments; 8) Can switch to different indentation styles by one command, and restore the settings present before the switch. 9) When doing indentation of control constructs, may correct line-breaks/spacing between elements of the construct. 10) Uses a linear-time algorithm for indentation of regions (on Emaxen with capable syntax engines). 11) Syntax-highlight, indentation, sexp-recognition inside regular expressions. (defvar cperl-praise 'please-ignore-this-line (#$ . 22713)) #@1832 This is an incomplete compendium of what is available in other parts of CPerl documentation. (Please inform me if I skept anything.) There is a perception that CPerl is slower than alternatives. This part of documentation is designed to overcome this misconception. *By default* CPerl tries to enable the most comfortable settings. From most points of view, correctly working package is infinitely more comfortable than a non-correctly working one, thus by default CPerl prefers correctness over speed. Below is the guide how to change settings if your preferences are different. A) Speed of loading the file. When loading file, CPerl may perform a scan which indicates places which cannot be parsed by primitive Emacs syntax-parsing routines, and marks them up so that either A1) CPerl may work around these deficiencies (for big chunks, mostly PODs and HERE-documents), or A2) On capable Emaxen CPerl will use improved syntax-handling which reads mark-up hints directly. The scan in case A2 is much more comprehensive, thus may be slower. User can disable syntax-engine-helping scan of A2 by setting `cperl-use-syntax-table-text-property' variable to nil (if it is set to t). One can disable the scan altogether (both A1 and A2) by setting `cperl-pod-here-scan' to nil. B) Speed of editing operations. One can add a (minor) speedup to editing operations by setting `cperl-use-syntax-table-text-property' variable to nil (if it is set to t). This will disable syntax-engine-helping scan, thus will make many more Perl constructs be wrongly recognized by CPerl, thus may lead to wrongly matched parentheses, wrong indentation, etc. One can unset `cperl-syntaxify-unwind'. This might speed up editing of, say, long POD sections. (defvar cperl-speed 'please-ignore-this-line (#$ . 27120)) #@2571 CPerl mode uses following faces for highlighting: `cperl-array-face' Array names `cperl-hash-face' Hash names `font-lock-comment-face' Comments, PODs and whatever is considered syntactically to be not code `font-lock-constant-face' HERE-doc delimiters, labels, delimiters of 2-arg operators s/y/tr/ or of RExen, `font-lock-warning-face' Special-cased m// and s//foo/, `font-lock-function-name-face' _ as a target of a file tests, file tests, subroutine names at the moment of definition (except those conflicting with Perl operators), package names (when recognized), format names `font-lock-keyword-face' Control flow switch constructs, declarators `cperl-nonoverridable-face' Non-overridable keywords, modifiers of RExen `font-lock-string-face' Strings, qw() constructs, RExen, POD sections, literal parts and the terminator of formats and whatever is syntactically considered as string literals `font-lock-type-face' Overridable keywords `font-lock-variable-name-face' Variable declarations, indirect array and hash names, POD headers/item names `cperl-invalid-face' Trailing whitespace Note that in several situations the highlighting tries to inform about possible confusion, such as different colors for function names in declarations depending on what they (do not) override, or special cases m// and s/// which do not do what one would expect them to do. Help with best setup of these faces for printout requested (for each of the faces: please specify bold, italic, underline, shadow and box.) In regular expressions (including character classes): `font-lock-string-face' "Normal" stuff and non-0-length constructs `font-lock-constant-face': Delimiters `font-lock-warning-face' Special-cased m// and s//foo/, Mismatched closing delimiters, parens we couldn't match, misplaced quantifiers, unrecognized escape sequences `cperl-nonoverridable-face' Modifiers, as gism in m/REx/gism `font-lock-type-face' escape sequences with arguments (\x \23 \p \N) and others match-a-char escape sequences `font-lock-keyword-face' Capturing parens, and | `font-lock-function-name-face' Special symbols: $ ^ . [ ] [^ ] (?{ }) (??{ }) "Range -" in character classes `font-lock-builtin-face' "Remaining" 0-length constructs, multipliers ?+*{}, not-capturing parens, leading backslashes of escape sequences `font-lock-variable-name-face' Interpolated constructs, embedded code, POSIX classes (inside charclasses) `font-lock-comment-face' Embedded comments (defvar cperl-tips-faces 'please-ignore-this-line (#$ . 29018)) (defalias 'cperl-define-key '(macro . #[(emacs-key definition &optional xemacs-key) "\303\304\203 \305\306 F\202 \nF\207" [xemacs-key emacs-key definition define-key cperl-mode-map if (featurep 'xemacs)] 6])) #@61 Character generated by key bound to `delete-backward-char'. (defvar cperl-del-back-ch (byte-code "\300\301\302!\301\303!\"@\207" [append where-is-internal delete-backward-char backward-delete-char-untabify] 4) (#$ . 31872)) (byte-code "\301!\203 G\302U\203 \303H\301\207" [cperl-del-back-ch vectorp 1 0] 2) (defalias 'cperl-mark-active #[nil "\300 \207" [mark] 1]) (byte-code "\300\301\302\"\210\300\303\304\"\207" [defalias cperl-use-region-p #[nil "\203 \207\302\207" [transient-mark-mode mark-active t] 1] cperl-mark-active #[nil "\207" [mark-active] 1]] 3) (defalias 'cperl-enable-font-lock #[nil "\207" [cperl-can-font-lock] 1]) (put 'cperl-enable-font-lock 'byte-optimizer 'byte-compile-inline-expand) (defalias 'cperl-putback-char #[(c) "C\211\207" [c unread-command-events] 2]) (byte-code "\300\301!\204 \302\301\303\"\210\300\207" [fboundp uncomment-region defalias #[(beg end) "\302 \303#\207" [beg end comment-region -1] 4 nil "r"]] 3) #@47 Text property which inhibits refontification. (defvar cperl-do-not-fontify (byte-code "\301\231\203 \302\207\303\207" [emacs-version "19.30" fontified lazy-lock] 2) (#$ . 32840)) (defalias 'cperl-put-do-not-fontify #[(from to &optional post) "\205 ?\205 \305e\nS]\f\306$\207" [post cperl-syntaxify-by-font-lock from to cperl-do-not-fontify put-text-property t] 5]) (byte-code "\300\301\302\303#\210\304\305\306\307\310\311\312\313&\207" [put cperl-put-do-not-fontify byte-optimizer byte-compile-inline-expand custom-declare-variable cperl-mode-hook nil "Hook run by CPerl mode." :type hook :group cperl] 8) (defvar cperl-syntax-state nil) (defvar cperl-syntax-done-to nil) (defvar cperl-emacs-can-parse (byte-code "\212\300``\")G\301V\207" [parse-partial-sexp 9] 3)) (defalias 'cperl-val #[(symbol &optional default hairy) "J\304=\203 \207\n\203 \206 \305\207J\207" [symbol default cperl-hairy hairy null t] 2]) (put 'cperl-val 'byte-optimizer 'byte-compile-inline-expand) #@148 Makes indent of the current line the requested amount. Unless KEEP, removes the old indentation. Works around a bug in ancient versions of Emacs. (defalias 'cperl-make-indent #[(column &optional minimum keep) "\304`\305\" \204\f \306 \210\307\n\"\210\2054 i\310V\2054 \212\311 \210\304`\305\"\2063 \312\313!\2053 \314`\310\225\305$))\207" [prop keep column minimum get-text-property syntax-type delete-horizontal-space indent-to 0 beginning-of-line looking-at "\\=[ ]" put-text-property] 5 (#$ . 33835)]) #@44 Abbrev table in use in CPerl mode buffers. (defvar cperl-mode-abbrev-table nil (#$ . 34352)) (add-hook 'edit-var-mode-alist '(perl-mode (regexp . "^cperl-"))) #@28 Keymap used in CPerl mode. (defvar cperl-mode-map nil (#$ . 34517)) (byte-code "\204\306 \307\310\311#\210\307\312\313#\210\307\314\313#\210\307\315\313#\210\307\316\317#\210\307\320\321#\210\307\322\321#\210\307\323\324#\210\307\325\326#\210\307\327\330#\210\307\331\332#\210\307\333\334#\210\307\335\336#\210\307\337\340#\210\307\341\342#\210\307\343\344#\210\307\345\346#\210\307\347\350#\210\307\351\352#\210\307\353\354#\210\307\355\356#\210\307\357\360#\210\307\361\362#\210\307\363\364#\210\307\365\366#\210\307\367\370#\210\307\371\372#\210\307\373\374#\210\307\375\376#\210\307\377\201@ #\210\307\201A \201B #\210\307\201C \201D #\210\201E \201F \211\211J\201G =\203\350 \n\202\370 \f\203\366 \206\370 \201H \202\370 J+\203/\307\201I \201D #\210\307\201J \201K #\210\307\201L \201M \201I !#\210\307\201N \201M \201J !#\210\202C\307\201L \201O #\210\307\201N \201K #\210\201P \201Q !\204Z\201R \201S \201T $\210\201R \201U \374 $\210\201R \201V \201W $\210\201R \201X \201Y $\210\201F \207" [cperl-mode-map hairy default symbol cperl-hairy global-map make-sparse-keymap define-key "{" cperl-electric-lbrace "[" cperl-electric-paren "(" "<" "}" cperl-electric-brace "]" cperl-electric-rparen ")" ";" cperl-electric-semi ":" cperl-electric-terminator "\n" newline-and-indent "\n" cperl-linefeed "" cperl-invert-if-unless "" cperl-toggle-auto-newline "" cperl-toggle-abbrev "" cperl-toggle-construct-fix "" auto-fill-mode "" cperl-toggle-electric "" cperl-find-bad-style "" cperl-pod-spell "" cperl-here-doc-spell "" cperl-narrow-to-here-doc "" cperl-next-interpolated-REx "" cperl-next-interpolated-REx-0 "" cperl-next-interpolated-REx-1 "a" cperl-toggle-autohelp "p" cperl-perldoc "P" cperl-perldoc-at-point "" cperl-indent-exp [201326716] cperl-lineup "" cperl-electric-backspace " " cperl-indent-command "F" cperl-info-on-command cperl-clobber-lisp-bindings nil null t "f" "v" cperl-get-help "f" key-binding "v" cperl-info-on-current-command boundp fill-paragraph-function substitute-key-definition fill-paragraph cperl-fill-paragraph indent-sexp indent-region cperl-indent-region indent-for-comment cperl-indent-for-comment] 6) (defvar cperl-old-style nil) (byte-code "\300\301\302\217\207" [nil (byte-code "\301\302!\210\303\304!\210\305\306\307\310$\207" [cperl-mode-map require easymenu (lambda (#1=#:def-tmp-var) (defvar cperl-menu #1# #2="Menu for CPerl mode")) nil easy-menu-do-define cperl-menu #2# ("Perl" ["Beginning of function" beginning-of-defun t] ["End of function" end-of-defun t] ["Mark function" mark-defun t] ["Indent expression" cperl-indent-exp t] ["Fill paragraph/comment" fill-paragraph t] "----" ["Line up a construction" cperl-lineup (cperl-use-region-p)] ["Invert if/unless/while etc" cperl-invert-if-unless t] ("Regexp" ["Beautify" cperl-beautify-regexp cperl-use-syntax-table-text-property] ["Beautify one level deep" (cperl-beautify-regexp 1) cperl-use-syntax-table-text-property] ["Beautify a group" cperl-beautify-level cperl-use-syntax-table-text-property] ["Beautify a group one level deep" (cperl-beautify-level 1) cperl-use-syntax-table-text-property] ["Contract a group" cperl-contract-level cperl-use-syntax-table-text-property] ["Contract groups" cperl-contract-levels cperl-use-syntax-table-text-property] "----" ["Find next interpolated" cperl-next-interpolated-REx (next-single-property-change (point-min) 'REx-interpolated)] ["Find next interpolated (no //o)" cperl-next-interpolated-REx-0 (or (text-property-any (point-min) (point-max) 'REx-interpolated t) (text-property-any (point-min) (point-max) 'REx-interpolated 1))] ["Find next interpolated (neither //o nor whole-REx)" cperl-next-interpolated-REx-1 (text-property-any (point-min) (point-max) 'REx-interpolated t)]) ["Insert spaces if needed to fix style" cperl-find-bad-style t] ["Refresh \"hard\" constructions" cperl-find-pods-heres t] "----" ["Indent region" cperl-indent-region (cperl-use-region-p)] ["Comment region" cperl-comment-region (cperl-use-region-p)] ["Uncomment region" cperl-uncomment-region (cperl-use-region-p)] "----" ["Run" mode-compile (fboundp 'mode-compile)] ["Kill" mode-compile-kill (and (fboundp 'mode-compile-kill) (get-buffer "*compilation*"))] ["Next error" next-error (get-buffer "*compilation*")] ["Check syntax" cperl-check-syntax (fboundp 'mode-compile)] "----" ["Debugger" cperl-db t] "----" ("Tools" ["Imenu" imenu (fboundp 'imenu)] ["Imenu on Perl Info" cperl-imenu-on-info (featurep 'imenu)] "----" ["Ispell PODs" cperl-pod-spell (or (get-text-property (point-min) 'in-pod) (< (progn (and cperl-syntaxify-for-menu (cperl-update-syntaxification (point-max) (point-max))) (next-single-property-change (point-min) 'in-pod nil (point-max))) (point-max)))] ["Ispell HERE-DOCs" cperl-here-doc-spell (< (progn (and cperl-syntaxify-for-menu (cperl-update-syntaxification (point-max) (point-max))) (next-single-property-change (point-min) 'here-doc-group nil (point-max))) (point-max))] ["Narrow to this HERE-DOC" cperl-narrow-to-here-doc (eq 'here-doc (progn (and cperl-syntaxify-for-menu (cperl-update-syntaxification (point) (point))) (get-text-property (point) 'syntax-type)))] ["Select this HERE-DOC or POD section" cperl-select-this-pod-or-here-doc (memq (progn (and cperl-syntaxify-for-menu (cperl-update-syntaxification (point) (point))) (get-text-property (point) 'syntax-type)) '(here-doc pod))] "----" ["CPerl pretty print (experimental)" cperl-ps-print (fboundp 'ps-extend-face-list)] "----" ["Syntaxify region" cperl-find-pods-heres-region (cperl-use-region-p)] ["Profile syntaxification" cperl-time-fontification t] ["Debug errors in delayed fontification" cperl-emulate-lazy-lock t] ["Debug unwind for syntactic scan" cperl-toggle-set-debug-unwind t] ["Debug backtrace on syntactic scan (BEWARE!!!)" (cperl-toggle-set-debug-unwind nil t) t] "----" ["Class Hierarchy from TAGS" cperl-tags-hier-init t] ("Tags" ["Create tags for current file" (cperl-write-tags nil t) t] ["Add tags for current file" (cperl-write-tags) t] ["Create tags for Perl files in directory" (cperl-write-tags nil t nil t) t] ["Add tags for Perl files in directory" (cperl-write-tags nil nil nil t) t] ["Create tags for Perl files in (sub)directories" (cperl-write-tags nil t t t) t] ["Add tags for Perl files in (sub)directories" (cperl-write-tags nil nil t t) t])) ("Perl docs" ["Define word at point" imenu-go-find-at-position (fboundp 'imenu-go-find-at-position)] ["Help on function" cperl-info-on-command t] ["Help on function at point" cperl-info-on-current-command t] ["Help on symbol at point" cperl-get-help t] ["Perldoc" cperl-perldoc t] ["Perldoc on word at point" cperl-perldoc-at-point t] ["View manpage of POD in this file" cperl-build-manpage t] ["Auto-help on" cperl-lazy-install (and (fboundp 'run-with-idle-timer) (not cperl-lazy-installed))] ["Auto-help off" cperl-lazy-unstall (and (fboundp 'run-with-idle-timer) cperl-lazy-installed)]) ("Toggle..." ["Auto newline" cperl-toggle-auto-newline t] ["Electric parens" cperl-toggle-electric t] ["Electric keywords" cperl-toggle-abbrev t] ["Fix whitespace on indent" cperl-toggle-construct-fix t] ["Auto-help on Perl constructs" cperl-toggle-autohelp t] ["Auto fill" auto-fill-mode t]) ("Indent styles..." ["CPerl" (cperl-set-style "CPerl") t] ["PerlStyle" (cperl-set-style "PerlStyle") t] ["GNU" (cperl-set-style "GNU") t] ["C++" (cperl-set-style "C++") t] ["K&R" (cperl-set-style "K&R") t] ["BSD" (cperl-set-style "BSD") t] ["Whitesmith" (cperl-set-style "Whitesmith") t] ["Memorize Current" (cperl-set-style "Current") t] ["Memorized" (cperl-set-style-back) cperl-old-style]) ("Micro-docs" ["Tips" (describe-variable 'cperl-tips) t] ["Problems" (describe-variable 'cperl-problems) t] ["Speed" (describe-variable 'cperl-speed) t] ["Praise" (describe-variable 'cperl-praise) t] ["Faces" (describe-variable 'cperl-tips-faces) t] ["CPerl mode" (describe-function 'cperl-mode) t] ["CPerl version" (message "The version of master-file for this CPerl is %s-Emacs" cperl-version) t]))] 5) ((error))] 3) #@141 Display the result of expanding all C macros occurring in the region. The expansion is entirely correct because it uses the C preprocessor. (autoload 'c-macro-expand "cmacexp" '(#$ . 42612) t) #@111 Regular expression to match optional whitespace with interspersed comments. Should contain exactly one group. (defconst cperl-maybe-white-and-comment-rex "[ \n]*\\(#[^\n]*\n[ \n]*\\)*" (#$ . 42812)) #@102 Regular expression to match whitespace with interspersed comments. Should contain exactly one group. (defconst cperl-white-and-comment-rex "\\([ \n]\\|#[^\n]*\n\\)+" (#$ . 43020)) #@217 Match the text after `sub' in a subroutine declaration. If NAMED is nil, allows anonymous subroutines. Matches up to the first ":" of attributes (if present), or end of the name or prototype (whatever is the last). (defalias 'cperl-after-sub-regexp #[(named attr) "\304\305\306 \203\f \307\202 \310\304\n\311\312\304\n\304\313\203&