# HG changeset patch # User Gerd Moellmann # Date 976640085 0 # Node ID 3e2309d79ff3bda51c5dc84840074b93d36ee3f3 # Parent c0363a97e5cb8a265d0b4db76cc10ed934ef337f (smiley-regexp-alist): Make regexps match at the end of the buffer. (smiley-region): In the loop, move to the end of the submatch matching the smiley instead of using the end of the match of the whole regexp. diff -r c0363a97e5cb -r 3e2309d79ff3 lisp/gnus/smiley-ems.el --- a/lisp/gnus/smiley-ems.el Tue Dec 12 16:14:39 2000 +0000 +++ b/lisp/gnus/smiley-ems.el Tue Dec 12 16:54:45 2000 +0000 @@ -52,9 +52,9 @@ ;; The XEmacs version has a baroque, if not rococo, set of these. (defcustom smiley-regexp-alist ;; Perhaps :-) should be distinct -- it does appear in the Jargon File. - '(("\\([:;]-?)\\)\\W" 1 "smile.pbm") - ("\\(:-[/\\]\\)\\W" 1 "wry.pbm") - ("\\(:-[({]\\)\\W" 1 "frown.pbm")) + '(("\\([:;]-?)\\)\\(\\W\\|\\'\\)" 1 "smile.pbm") + ("\\(:-[/\\]\\)\\(\\W\\|\\'\\)" 1 "wry.pbm") + ("\\(:-[({]\\)\\(\\W\\|\\'\\)" 1 "frown.pbm")) "*A list of regexps to map smilies to images. The elements are (REGEXP MATCH FILE), where MATCH is the submatch in rgexp to replace with IMAGE. IMAGE is the name of a PBM file in @@ -123,7 +123,8 @@ (overlay-put overlay 'smiley t) (overlay-put overlay 'help-echo "mouse-2: toggle smilies in buffer") - (overlay-put overlay 'keymap smiley-mouse-map)))))) + (overlay-put overlay 'keymap smiley-mouse-map) + (goto-char (match-end group))))))) (setq smiley-active t))) (defun smiley-toggle-buffer (&optional arg)