From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rajsekar Newsgroups: gmane.emacs.devel Subject: Re: smiley regexp problem Date: Mon, 21 Mar 2005 13:36:37 +0530 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1111393939 23984 80.91.229.2 (21 Mar 2005 08:32:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 21 Mar 2005 08:32:19 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 21 09:32:17 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DDIK6-0005WA-8S for ged-emacs-devel@m.gmane.org; Mon, 21 Mar 2005 09:31:42 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DDIb9-0002gN-SX for ged-emacs-devel@m.gmane.org; Mon, 21 Mar 2005 03:49:19 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DDIar-0002cq-45 for emacs-devel@gnu.org; Mon, 21 Mar 2005 03:49:01 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DDIYC-0001cp-CE for emacs-devel@gnu.org; Mon, 21 Mar 2005 03:46:17 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DDIY0-0000uL-O0 for emacs-devel@gnu.org; Mon, 21 Mar 2005 03:46:04 -0500 Original-Received: from [202.141.25.89] (helo=pridns.cs.iitm.ernet.in) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1DDHvu-0005gR-5p; Mon, 21 Mar 2005 03:06:43 -0500 Original-Received: from meenakshi.cs.iitm.ernet.in (meenakshi.cs.iitm.ernet.in [10.6.10.2]) by pridns.cs.iitm.ernet.in (8.12.10/8.12.10) with ESMTP id j2L8COuT007448; Mon, 21 Mar 2005 13:42:24 +0530 Original-Received: from rajsekar.pc ([10.132.7.21]) by meenakshi.cs.iitm.ernet.in (8.11.2/8.11.2) with ESMTP id j2L7rFo01341; Mon, 21 Mar 2005 13:23:17 +0530 Original-To: David Kastrup In-Reply-To: (David Kastrup's message of "Sun, 20 Mar 2005 22:48:40 +0100") User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: news.gmane.org gmane.emacs.devel:34876 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:34876 David Kastrup writes: > Rajsekar writes: > >> Rajsekar writes: >> >>> I want to setup the smileys similar to gaim. >>> So I put >>> >>> "\\(:)\\)\\W" for smile. >>> and >>> "\\(:))\\)\\W" for laugh. >>> >>> The problem is that :)) also contains a :). At the same time, i do not >>> want to replace \W with something like [^)] because i lose the advantage of >>> \W (which works based on the current syntax). I want something like \\W >>> minus the character `('. Can someone tell me how to achieve this? >> >> I see from theory that the needed language is still a regexp, yet i >> am not able to express it in the language of regexp. Is it a >> shortcoming in the language? > > Why don't you match "laugh" first, and only look for a smile if no > laugh is can be found? The code to add the smiley (gnus/smiley.el) does not allow me to do that. If I have `:))', both, smile and laugh pictures get inserted. -- Rajsekar Manokaran IIT Madras