help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cperl-mode] fontification problem with PODs


From: Joseph Brenner
Subject: Re: [cperl-mode] fontification problem with PODs
Date: Sun, 06 Dec 2009 16:12:24 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

LanX <address@hidden> writes:

> I experienced a problem with the fontification of POD's.
>
> In the following example the second line is not classified as pod but
> the keyword "for" is considered part of a loop statement.
>
> --------------------------
> address@hidden:~/tmp$ cat perlpod.pm
> for (1..9) {print}
> =for comment
>
> This B<document> is in Pod format.  To read this, use a Pod formatter,
> like "perldoc perlpod".
>
> =cut
> ---------------------------
>
> which might be OK since there is an empty line missing between POD and
> code.
>
> So adding a newline at the second line should solve the problem, but
> doesn't do so!!!

I was going to point out the same thing, but also, I recommend running
the "podchecker" program occasionally.

pod is cool, but very wasteful of vertical whitespace, and weirdly
enough it's whitespace sensitive: it wants completely empty blank lines
before and after the tags -- blank lines with spaces on them are not
good enough.

> Strangely this problem is NOT present when calling emacs with -Q
>
> ---------------------------
> address@hidden:~/tmp$ emacs -Q perlpod.pm -f cperl-mode
> ---------------------------
>
> So adding the newline solves the problem!
> And calling "M-x describe-text-properties" shows that the POD-text is
> classified as such.

This is indeed sounding pretty weird.

> It seems that loading another cperl-mode version causes conflicts with
> the bundled version!
>
> So effectively one has to stick with the bundled version ... :(

Well... I might suspect a conflict between something else you normally
load and cperl-mode.  It's difficult to say what... remember that emacs
has just one big global namespace, so hypothetically all sorts of
action-at-a-distance problems are possible with poorly written elisp.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]