Commits

Anonymous committed 33389f1

Sync cperl-mode.el with upstream 6.2.

  • Participants
  • Parent commits 24f6044

Comments (0)

Files changed (2)

+2008-04-15  Ville Skyttä  <scop@xemacs.org>
+
+	* cperl-mode.el: Sync with upstream 6.2, all our changes applied.
+
 2008-04-04  Norbert Koch  <viteno@xemacs.org>
 
 	* Makefile (VERSION): XEmacs package 1.13 released.

File cperl-mode.el

 ;;; toplevel:			Define obsolete alias for `pod-spell'
 ;;;				autoload updates to `mode-alist's
 
+;;; After 6.1:
+;;; toplevel:			Add .PM to autoload mode list
+;;; `cperl-insert-faces-example': New function
+;;; Mode menu:			New Micro-docs choice: Show Faces
+
 ;;; Code:
 
 (if (fboundp 'eval-when-compile)
 	  ["Speed" (describe-variable 'cperl-speed) t]
 	  ["Praise" (describe-variable 'cperl-praise) t]
 	  ["Faces" (describe-variable 'cperl-tips-faces) t]
+	  ["Show Faces" (cperl-insert-faces-example) t]
 	  ["CPerl mode" (describe-function 'cperl-mode) t]
 	  ["CPerl version"
 	   (message "The version of master-file for this CPerl is %s"
 Part of the indentation style is how different parts of if/elsif/else
 statements are broken into lines; in CPerl, this is reflected on how
 templates for these constructs are created (controlled by
-`cperl-extra-newline-before-brace'), and how reflow-logic should treat \"continuation\" blocks of else/elsif/continue, controlled by the same variable,
-and by `cperl-extra-newline-before-brace-multiline',
+`cperl-extra-newline-before-brace'), and how reflow-logic should treat
+\"continuation\" blocks of else/elsif/continue, controlled by the same
+variable, and by `cperl-extra-newline-before-brace-multiline',
 `cperl-merge-trailing-else', `cperl-indent-region-fix-constructs'.
 
 If `cperl-indent-level' is 0, the statement after opening brace in
 Turning on CPerl mode calls the hooks in the variable `cperl-mode-hook'
 with no args.
 
-DO NOT FORGET to read micro-docs (available from `Perl' menu)
+DO NOT FORGET to read micro-docs (available from `Perl' menu,
 or as help on variables `cperl-tips', `cperl-problems',
-`cperl-non-problems', `cperl-praise', `cperl-speed'."
+`cperl-non-problems', `cperl-praise', `cperl-speed',
+`cperl-tips-faces')."
   (interactive)
   (kill-all-local-variables)
   (use-local-map cperl-mode-map)
        (progn (or cperl-faces-init (cperl-init-faces-weak))
 	      (cperl-find-pods-heres)))))
 
+(defun cperl-insert-faces-example ()
+  "Insert example \"CODE\" demonstrating CPerl facification at beginning-of-line."
+  (or (bolp)
+      (beginning-of-line))
+  (insert
+  "my $o = sprintf grep //, <<EOP, $ENV{$_} or warn $$msg[0] for @ARGV; #junk 
+some string
+EOP
+-f _ or -f $_ or die 'What?';
+
+/\\3333\\xFg\\x{FFF}a\\ppp\\PPP\\qqq\\C\\99f(?{  foo  })(??{  foo  })/;
+/a{4,5}\\.b[^a[:ff:]b]x$ab->$[|$,$ab->[cd]->[ef]|$ab[xy].|^${a,b}{c,d}/;
+/(?<=foo)(?<!bar)(x\")(?:$ab|\\$\\/)$|\\\\\\b\\x888\\776\\[\\:$/xxx;
+m?(\\?\\?{b,a})? + m/(??{aa})(?(?=xx)aa|bb)(?#aac)/;
+m$(^ab[c]\\$)$ + m+(^ab[c]\\$\\+)+ + m](^ab[c\\]$|.+)] + m)(^ab[c]$|.+\\));
+s{a}{};
+s/.a//;
+m^a[\\^b-e\\xFF]c^ + m.a[^b]\\.c.;					#  OK
+m^a[\\^-b-\\e--[\\--\\xFF\\c[\\cX-\\0333-\\0555-\\N{name}\\pp--\\P{prop}--\\\\\\05555]^;
+m^a[[:alpha:]-[:alpha:]-a-[:alpha:][-aa-[[:alpha:]-b-[:alpha:]-[:alpha:]]^;
+m^a[x\\\\[:alpha:]-\\\\[:alpha:]-a-\\\\[:alpha:][-aa-[[:alpha:]-b-\\\\[:alpha:]-\\\\[:alpha:]]^;
+m^a[x\\\\[:alpha:][:alpha:]\\\\[:alpha:][-aa-[[:alpha:]\\\\[:alpha:][:alpha:]]^;
+"))
+
 ;; Fix for perldb - make default reasonable
 (defun cperl-db ()
   (interactive)