all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* smiley regexp problem
@ 2005-03-17 11:55 Rajsekar
  2005-03-20 21:23 ` Rajsekar
  0 siblings, 1 reply; 9+ messages in thread
From: Rajsekar @ 2005-03-17 11:55 UTC (permalink / raw)



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?


-- 
    Rajsekar Manokaran
    IIT Madras

^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: smiley regexp problem
@ 2005-03-21 10:47 LENNART BORGMAN
  2005-03-21 12:12 ` Rajsekar
  0 siblings, 1 reply; 9+ messages in thread
From: LENNART BORGMAN @ 2005-03-21 10:47 UTC (permalink / raw)
  Cc: emacs-devel

> >>> 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, 
...
> > 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.

Maybe you could add a complemented character set to the first one after the smile (with whatever slashes there are needed to get this to work): [^)] 

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2005-03-21 19:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-17 11:55 smiley regexp problem Rajsekar
2005-03-20 21:23 ` Rajsekar
2005-03-20 21:48   ` David Kastrup
2005-03-21  8:06     ` Rajsekar
  -- strict thread matches above, loose matches on Subject: below --
2005-03-21 10:47 LENNART BORGMAN
2005-03-21 12:12 ` Rajsekar
2005-03-21 13:22   ` Lennart Borgman
2005-03-21 13:49   ` Stefan Monnier
2005-03-21 19:53     ` Rajsekar

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.