From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Erik Newsgroups: gmane.emacs.bugs Subject: bug#1913: Identifier after reserved word "raise" is not always highlighted in Ada-mode Date: Fri, 16 Jan 2009 00:03:13 +0100 Message-ID: <496FC0B1.3020207@gmail.com> References: <496EECEB.1020209@gmail.com> <496F3CE6.3080600@gmail.com> Reply-To: Erik , 1913@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1232061882 14918 80.91.229.12 (15 Jan 2009 23:24:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 15 Jan 2009 23:24:42 +0000 (UTC) Cc: 1913@emacsbugs.donarmstrong.com To: Juanma Barranquero Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 16 00:25:52 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LNbaw-0001Bq-SZ for geb-bug-gnu-emacs@m.gmane.org; Fri, 16 Jan 2009 00:25:52 +0100 Original-Received: from localhost ([127.0.0.1]:40568 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LNbZg-00037k-GC for geb-bug-gnu-emacs@m.gmane.org; Thu, 15 Jan 2009 18:24:32 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LNbYm-0002Dv-Ec for bug-gnu-emacs@gnu.org; Thu, 15 Jan 2009 18:23:36 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LNbYj-0002Af-6e for bug-gnu-emacs@gnu.org; Thu, 15 Jan 2009 18:23:35 -0500 Original-Received: from [199.232.76.173] (port=59316 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LNbYi-0002AO-Q4 for bug-gnu-emacs@gnu.org; Thu, 15 Jan 2009 18:23:32 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:54718) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LNbYh-0008VX-Qh for bug-gnu-emacs@gnu.org; Thu, 15 Jan 2009 18:23:32 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0FNNQJc026463; Thu, 15 Jan 2009 15:23:28 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n0FN580L021104; Thu, 15 Jan 2009 15:05:08 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Erik Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs , owner@emacsbugs.donarmstrong.com Resent-Date: Thu, 15 Jan 2009 23:05:08 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 1913 X-Emacs-PR-Package: emacs,ada-mode X-Emacs-PR-Keywords: Original-Received: via spool by 1913-submit@emacsbugs.donarmstrong.com id=B1913.123206040318575 (code B ref 1913); Thu, 15 Jan 2009 23:05:08 +0000 Original-Received: (at 1913) by emacsbugs.donarmstrong.com; 15 Jan 2009 23:00:03 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.155]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0FMxw8A018521 for <1913@emacsbugs.donarmstrong.com>; Thu, 15 Jan 2009 14:59:59 -0800 Original-Received: by fg-out-1718.google.com with SMTP id l27so633685fgb.43 for <1913@emacsbugs.donarmstrong.com>; Thu, 15 Jan 2009 14:59:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=AnG/m4rVfmShXQvuHx+lqfVZgriyS/9VAvwf1qGKs6g=; b=WK+0ukMarV1fSfxHw2cHhcqIsOtXdf4mXZ6bN9s9g0VDGdH3A6f8sW1VJT0kvla5Uy BbdsK6lJm8H3gnv+t68aIF7m+SRLAZRJysINcaNsIYa0Sl56B7v08qPNUVkfySvRWaea 8nQIzy94HYs7ZSy6bliBzEA/41HtsLQSRCx8M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=S+3em3fBHmXfrelpEefs30jhQDaWnGMcRdttwDBVF8Aa188TjmYDnAo5lV25CMWrat JKSR5T6rA8WMXf9fuyvKeWZ9X4GnSMecCniyk14Pd3irIxg/+dIkYyGaQdX3cthoS45I wOriCwYoeXxCneyjVfo9EApHCk0v1XfbiSy3k= Original-Received: by 10.86.80.17 with SMTP id d17mr1620234fgb.55.1232060396553; Thu, 15 Jan 2009 14:59:56 -0800 (PST) Original-Received: from ?192.168.0.46? (92.44.227.87.static.f.siw.siwnet.net [87.227.44.92]) by mx.google.com with ESMTPS id d6sm1164430fga.50.2009.01.15.14.59.54 (version=SSLv3 cipher=RC4-MD5); Thu, 15 Jan 2009 14:59:55 -0800 (PST) User-Agent: Thunderbird 2.0.0.19 (X11/20090102) In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Thu, 15 Jan 2009 18:23:35 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:24174 Archived-At: Juanma Barranquero skrev: > On Thu, Jan 15, 2009 at 14:40, Erik 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.