From: Feng Li <fengli@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: Fixing a bug in pascal-mode
Date: Sun, 6 Apr 2014 23:25:34 +0000 (UTC) [thread overview]
Message-ID: <loom.20140407T011211-683@post.gmane.org> (raw)
In-Reply-To: 53419083.4080901@dancol.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
next prev parent reply other threads:[~2014-04-06 23:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-06 7:19 Fixing a bug in pascal-mode Feng Li
2014-04-06 10:40 ` Feng Li
2014-04-06 17:36 ` Daniel Colascione
2014-04-06 23:25 ` Feng Li [this message]
2014-04-07 14:03 ` Stefan Monnier
2014-04-07 14:24 ` Feng Li
2014-04-10 13:57 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=loom.20140407T011211-683@post.gmane.org \
--to=fengli@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).