;; CPerl mode hook
(setq cperl-mode-hook 'my-cperl-customizations)
(defun my-cperl-customizations ()
"cperl-mode customizations that must be done after cperl-mode loads"
(outline-minor-mode)
(abbrev-mode)
(defun cperl-outline-level ()
(looking-at outline-regexp)
(let ((match (match-string 1)))
(cond
((eq match "=head1" ) 1)
((eq match "package") 2)
((eq match "=head2" ) 3)
((eq match "=item" ) 4)
((eq match "sub" ) 5)
(t 7)
)))
(setq cperl-outline-regexp my-cperl-outline-regexp)
(setq outline-regexp cperl-outline-regexp)
(setq outline-level 'cperl-outline-level)
)
####
=head2 STUFF
=over
=item foo
Do foo
=cut
sub foo {
return 'foo';
}
####
=head2 STUFF...
####
=head2 STUFF...
=item foo
Do foo
=cut
sub foo {
return 'foo';
}
####
(add-hook 'outline-minor-mode-hook 'outshine-hook-function)