You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by Matthew Cline <ma...@nightrealms.com> on 2005/07/02 04:01:50 UTC

XEmacs font-lock mode

The way my XEmacs setup is font-locking code, unmatched quotes in POD result 
in the text after that all being treated as if it was in a quote.  Then the 
next time it sees an unmatched quote in a POD section, it considers the 
string finished, but the font-locker considers itself to be outside of any 
POD section, so when it hits the "=cut" to end the POD section, it acts like 
it's entering a POD section (the "=" at the start of a line does it) so 
everything afterwords is red.

As an example, everything turns green at line 1065 of 
lib/Mail/SpamAssassin/PerMsgStatus.pm, after "caller's", then turns red after 
the "=cut" on line 1266, because of the "Perl's" on line 1264.

So, is there any sort of setting or alternative Perl mode that I could use?  
I'm using XEmacs 21.4.14.

Thanks.

-- 
Give a man a match, and he'll be warm for a minute, but set him on
fire, and he'll be warm for the rest of his life.

Advanced SPAM filtering software: http://spamassassin.org


Re: XEmacs font-lock mode

Posted by Sidney Markowitz <si...@sidney.com>.
Matthew Cline wrote:
> The way my XEmacs setup is font-locking code, unmatched quotes in POD result 
> in the text after that all being treated as if it was in a quote.

Is this a newer version of perl-mode and does it fix it?

http://list-archive.xemacs.org/xemacs-cvs/200504/msg00144.html

 -- sidney

Re: XEmacs font-lock mode

Posted by Sidney Markowitz <si...@sidney.com>.
Right after I sent that last reply I ran into this suggestion. I haven't
tried it yet, but it looked like something worth trying:

http://www.khngai.com/emacs/perl.php

 -- sidney

Re: XEmacs font-lock mode

Posted by Sidney Markowitz <si...@sidney.com>.
And I hope this is my last update on the topic -- I keep finding something
which obsoletes what I just posted.

That last one has a bad old link. I found a recently updated wiki page with
a lot more information about cperl mode including current links and a lot of
documentation:

http://www.emacswiki.org/cgi-bin/wiki/CPerlMode

 -- sidney

Re: XEmacs font-lock mode

Posted by Sidney Markowitz <si...@sidney.com>.
And now I've learned the where and the why of it.

It says at http://www.linuxselfhelp.com/HOWTO/Emacs-Beginner-HOWTO-3.html

"Perl

There are actually two modes for editing Perl code in Emacs. The first is
called perl-mode (as you would expect) and the second is cperl-mode. I don't
have a good grasp of this history and why there are two modes (the docs
don't say), but it would appear that perl-mode was the original mode for
editing Perl code in Emacs. It seems to have fewer features than cperl-mode
and is lacking the ability to recognize some of Perl's fancier language
constructs.

Personally, I use and recommend cperl-mode which seems to be quite actively
maintained and has just about every feature I could ever want. You can find
the latest release here: ftp://ftp.math.ohio-state.edu/pub/users/ilya/emacs.

But don't take my word for it. Try them both and pick the one that best
meets your needs."

 -- sidney