From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim Johnson Newsgroups: gmane.emacs.help Subject: Regex Problem => "overlapping words" Date: Fri, 2 Dec 2005 10:35:27 -0900 Message-ID: <20051202193527.GM1806@johnsons-web.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1133552554 12196 80.91.229.2 (2 Dec 2005 19:42:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 2 Dec 2005 19:42:34 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Dec 02 20:42:31 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EiGm9-0005FW-TQ for geh-help-gnu-emacs@m.gmane.org; Fri, 02 Dec 2005 20:40:59 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EiGm9-0006w2-AO for geh-help-gnu-emacs@m.gmane.org; Fri, 02 Dec 2005 14:40:57 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EiGiH-0004mz-AV for help-gnu-emacs@gnu.org; Fri, 02 Dec 2005 14:36:57 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EiGiC-0004iN-2d for help-gnu-emacs@gnu.org; Fri, 02 Dec 2005 14:36:56 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EiGiB-0004hy-P0 for help-gnu-emacs@gnu.org; Fri, 02 Dec 2005 14:36:51 -0500 Original-Received: from [208.218.214.44] (helo=ns3.cniweb.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EiGiD-0006c8-3l for help-gnu-emacs@gnu.org; Fri, 02 Dec 2005 14:36:53 -0500 Original-Received: from linus.johnson.com (rdbck-static-445.palmer.mtaonline.net [64.4.232.191]) by ns3.cniweb.net (8.13.5/8.13.5) with ESMTP id jB2JaV1T021148 for ; Fri, 2 Dec 2005 14:36:32 -0500 (EST) Original-Received: from linus.johnson.com (localhost.johnson.com [127.0.0.1]) by linus.johnson.com (8.12.8/8.12.8) with ESMTP id jB2JZSwr015085 for ; Fri, 2 Dec 2005 10:35:28 -0900 Original-Received: (from tim@localhost) by linus.johnson.com (8.12.8/8.12.8/Submit) id jB2JZRo4015083 for help-gnu-emacs@gnu.org; Fri, 2 Dec 2005 10:35:27 -0900 Original-To: help-gnu-emacs@gnu.org Mail-Followup-To: Tim Johnson , help-gnu-emacs@gnu.org Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:31622 Archived-At: I have a regex problem: the form containing the regex should appear as one line between two lines of asterisks: ****************************************************************************************************************************** '("\\([^][ \t\r\n{}()]+\\):[ ]*\\(d\\(ef\\|oes\\)\\|func\\(tion\\)\\|has\\|sub?\\)\\>" (1 prepend) (2 font-lock-keyword-face)) ****************************************************************************************************************************** The intent is that the following 'words': def, does, func, function, has, sub Should be highlighted as per 'font-lock-keyword-face. 'function' is *not* highlighted, so I have not handled the "overlapping" words properly. All others are displayed as intended I hope that someone can show me what I have done wrong. thanks tim -- Tim Johnson http://www.alaska-internet-solutions.com