From: Erik <esigra@gmail.com>
To: Juanma Barranquero <lekktu@gmail.com>
Cc: 1913@emacsbugs.donarmstrong.com
Subject: bug#1913: Identifier after reserved word "raise" is not always highlighted in Ada-mode
Date: Fri, 16 Jan 2009 00:03:13 +0100 [thread overview]
Message-ID: <496FC0B1.3020207@gmail.com> (raw)
In-Reply-To: <f7ccd24b0901150642ke81e8b5i69cc8584226bbeac@mail.gmail.com>
Juanma Barranquero skrev:
> On Thu, Jan 15, 2009 at 14:40, Erik <esigra@gmail.com> wrote:
>
>
>> The patch is an improvement, but it highlights some illegal identifiers.
>>
>
> That shouldn't be a problem. You don't use font-locking to determine
> whether the identifier follows Ada rules, do you? :-)
>
Actually I do notice the highlighting and take advantage of it as an
early error detector. If it makes me notice an error immediately, before
I move on to another part of the code or try to compile things, it is
useful. If a word is not highlighted as expected when I have typed it, I
automatically stop to see what I did wrong.
>> (no leading, consecutive or trailing '_')
>>
>
> Yes, I know the spec. But I don't think the problem of false positives
> is worth making the regexp slower.
>
Did you have a performance problem with that regexp? I do not really
believe that there is a reason to worry about it without some
measurements. I have a 1.6 GHz CPU and want to take advantage of it. I
think it should be able to recognize Ada identifiers as a type them.
The regexp guru that I once talked with suggested this:
[[:alpha:]](?:_?[^\W_])*
The (?:) is equivalent to () but faster since it is a so-called
non-capturing group, which should always be used when capturing is not
needed. Maybe that helps?
>> There seems to be a lot of places with a-z in ada-mode.el.
>>
>
> Yes. I suppose Stephen will welcome patches, assuming they are correct.
>
> Are you aware of the Emacs ada-mode hompage
>
> http://www.stephe-leake.org/emacs/ada-mode/emacs-ada-mode.html
>
> and list
>
> http://stephe-leake.org/mailman/listinfo/emacs-ada-mode_stephe-leake.org
>
> ?
>
No, I just subscribed now, thanks. If I make any changes I will send it
there.
next prev parent reply other threads:[~2009-01-15 23:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-15 7:59 bug#1913: Identifier after reserved word "raise" is not always highlighted in Ada-mode Erik
2009-01-15 9:12 ` Juanma Barranquero
2009-01-15 13:40 ` Erik
2009-01-15 14:42 ` Juanma Barranquero
2009-01-15 23:03 ` Erik [this message]
2009-01-15 23:10 ` Juanma Barranquero
2009-01-16 2:16 ` Stefan Monnier
2009-01-16 2:22 ` Juanma Barranquero
2020-04-16 18:42 ` Stephen Leake
2020-07-02 18:11 ` bug#1913: closed by ada-mode version 7.1 Stephen Leake
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=496FC0B1.3020207@gmail.com \
--to=esigra@gmail.com \
--cc=1913@emacsbugs.donarmstrong.com \
--cc=lekktu@gmail.com \
/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).