emacs-devel
[Top][All Lists]
Advanced

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

Re: Fixing a bug in pascal-mode


From: Feng Li
Subject: Re: Fixing a bug in pascal-mode
Date: Sun, 6 Apr 2014 23:25:34 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Daniel Colascione <dancol <at> dancol.org> writes:

> 
> On 04/06/2014 03:40 AM, Feng Li wrote:
> > Feng Li <fengli <at> gmail.com> writes:
> > 
> >> Hi Emacs devs,
> >>
> >> I just fixed a small bug in pascal-mode. Here's the diff
> >>
> 
> Can you write a testcase?
> 
> 

Hi Daniel,

I'm not sure what kind of testcase do you want. I had a brief look in the
source tree and didn't see any Pascal (or other languages) syntax
highlighting testcases under the 'test' directory, which I could use as
examples to write my testcases for these bugs.

I could describe the nature of the 2 bugs though as they are really quite
straightforward. So if you know how to write testcases probably you could help?

The first bug actually prevents any syntax highlighting rules after it to
run because that slot, if it's a list, then it should be a function rather
than a font lock class. Emacs prints out errors like "function is void:
font-lock-type-face" to the messages buffer.  If there is any existing
Pascal mode syntax highlighting testcases then most of them should already fail.

The second bug is that in the syntax table the '_' character is considered a
symbol delimiter but not a word delimiter. Therefore the regexps would match
sub-strings inside a symbol. For example, the variable 'value_to_rgb' would
have the 'to' matched as a keyword and the 'to' gets highlighted.

Hopefully this helps. 

--
Feng Li




reply via email to

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