* Curiosity: Perl File Extension in Emacs Config
@ 2012-07-13 17:10 Xah Lee
2012-07-13 19:55 ` John Bokma
0 siblings, 1 reply; 4+ messages in thread
From: Xah Lee @ 2012-07-13 17:10 UTC (permalink / raw)
To: help-gnu-emacs
A curiosity question.
emacs's “auto-mode-alist” has this value:
("\\.\\([pP]\\([Llm]\\|erl\\|od\\)\\|al\\)\\'" . perl-mode)
the regex there seems a bit wild. If i didn't get it wrong, then its like this
. ([pP] ( [Llm] | erl | od ) | al )
so it covers:
.pl
.perl
.pod
.pm
.al
plus SOME case variations. e.g. {.pL , .PL}.
what's the “.al” for?
is it necessary to include the “.pod”? because the perl-mode doesn't do any coloring with “.pod” files, nor cperl-mode. If there's a mode handing “.pod” file am guessing it won't be perl-mode.
also, is the “.perl” there necessary? Is that a accepted perl file suffix? (Just checked it's not in any file bundled with perl v5.10.1.)
would it be better if it's just
("\\.\\(p\\([lm]\\)\\)\\'" . perl-mode)
?
Xah
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Curiosity: Perl File Extension in Emacs Config
2012-07-13 17:10 Curiosity: Perl File Extension in Emacs Config Xah Lee
@ 2012-07-13 19:55 ` John Bokma
2012-07-14 4:10 ` Xah Lee
0 siblings, 1 reply; 4+ messages in thread
From: John Bokma @ 2012-07-13 19:55 UTC (permalink / raw)
To: help-gnu-emacs
Xah Lee <xahlee@gmail.com> writes:
> what's the “.al” for?
"As an example, if POSIX.pm is located in
/usr/local/lib/perl5/POSIX.pm, AutoLoader will look for perl
subroutines POSIX in /usr/local/lib/perl5/auto/POSIX/*.al, where the
.al file has the same name as the subroutine, sans package. If such a
file exists, AUTOLOAD will read and evaluate it, thus (presumably)
defining the needed subroutine. AUTOLOAD will then goto the newly
defined subroutine."
http://perldoc.perl.org/AutoLoader.html
--
John Bokma j3b
Blog: http://johnbokma.com/ Perl Consultancy: http://castleamber.com/
Perl for books: http://johnbokma.com/perl/help-in-exchange-for-books.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Curiosity: Perl File Extension in Emacs Config
2012-07-13 19:55 ` John Bokma
@ 2012-07-14 4:10 ` Xah Lee
2012-07-15 3:52 ` John Bokma
0 siblings, 1 reply; 4+ messages in thread
From: Xah Lee @ 2012-07-14 4:10 UTC (permalink / raw)
To: help-gnu-emacs
heh, John Bokma!
thanks.
Xah
On Friday, July 13, 2012 12:55:25 PM UTC-7, John Bokma wrote:
> Xah Lee writes:
>
> > what's the “.al” for?
>
> "As an example, if POSIX.pm is located in
> /usr/local/lib/perl5/POSIX.pm, AutoLoader will look for perl
> subroutines POSIX in /usr/local/lib/perl5/auto/POSIX/*.al, where the
> .al file has the same name as the subroutine, sans package. If such a
> file exists, AUTOLOAD will read and evaluate it, thus (presumably)
> defining the needed subroutine. AUTOLOAD will then goto the newly
> defined subroutine."
>
> http://perldoc.perl.org/AutoLoader.html
>
> --
> John Bokma j3b
>
> Blog: http://johnbokma.com/ Perl Consultancy: http://castleamber.com/
> Perl for books: http://johnbokma.com/perl/help-in-exchange-for-books.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-07-15 3:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-13 17:10 Curiosity: Perl File Extension in Emacs Config Xah Lee
2012-07-13 19:55 ` John Bokma
2012-07-14 4:10 ` Xah Lee
2012-07-15 3:52 ` John Bokma
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).