diff options
| author | Gerd Moellmann | 2000-12-12 16:54:45 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-12-12 16:54:45 +0000 |
| commit | d6a1d28906986cfc7fefe41c88b5c686d3d9e1b8 (patch) | |
| tree | ffee41104530894ec85b4eaf5b6d1c0830dfe77f | |
| parent | 06507d30faeadcaaf7dcd96a11225e03d9960b29 (diff) | |
| download | emacs-d6a1d28906986cfc7fefe41c88b5c686d3d9e1b8.tar.gz emacs-d6a1d28906986cfc7fefe41c88b5c686d3d9e1b8.zip | |
(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.
| -rw-r--r-- | lisp/gnus/smiley-ems.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/gnus/smiley-ems.el b/lisp/gnus/smiley-ems.el index 78d8007f7fa..4b54197c40e 100644 --- a/lisp/gnus/smiley-ems.el +++ b/lisp/gnus/smiley-ems.el | |||
| @@ -52,9 +52,9 @@ This is in addition to the normal image search path." | |||
| 52 | ;; The XEmacs version has a baroque, if not rococo, set of these. | 52 | ;; The XEmacs version has a baroque, if not rococo, set of these. |
| 53 | (defcustom smiley-regexp-alist | 53 | (defcustom smiley-regexp-alist |
| 54 | ;; Perhaps :-) should be distinct -- it does appear in the Jargon File. | 54 | ;; Perhaps :-) should be distinct -- it does appear in the Jargon File. |
| 55 | '(("\\([:;]-?)\\)\\W" 1 "smile.pbm") | 55 | '(("\\([:;]-?)\\)\\(\\W\\|\\'\\)" 1 "smile.pbm") |
| 56 | ("\\(:-[/\\]\\)\\W" 1 "wry.pbm") | 56 | ("\\(:-[/\\]\\)\\(\\W\\|\\'\\)" 1 "wry.pbm") |
| 57 | ("\\(:-[({]\\)\\W" 1 "frown.pbm")) | 57 | ("\\(:-[({]\\)\\(\\W\\|\\'\\)" 1 "frown.pbm")) |
| 58 | "*A list of regexps to map smilies to images. | 58 | "*A list of regexps to map smilies to images. |
| 59 | The elements are (REGEXP MATCH FILE), where MATCH is the submatch in | 59 | The elements are (REGEXP MATCH FILE), where MATCH is the submatch in |
| 60 | rgexp to replace with IMAGE. IMAGE is the name of a PBM file in | 60 | rgexp to replace with IMAGE. IMAGE is the name of a PBM file in |
| @@ -123,7 +123,8 @@ which smileys to operate on and which images to use for them." | |||
| 123 | (overlay-put overlay 'smiley t) | 123 | (overlay-put overlay 'smiley t) |
| 124 | (overlay-put overlay | 124 | (overlay-put overlay |
| 125 | 'help-echo "mouse-2: toggle smilies in buffer") | 125 | 'help-echo "mouse-2: toggle smilies in buffer") |
| 126 | (overlay-put overlay 'keymap smiley-mouse-map)))))) | 126 | (overlay-put overlay 'keymap smiley-mouse-map) |
| 127 | (goto-char (match-end group))))))) | ||
| 127 | (setq smiley-active t))) | 128 | (setq smiley-active t))) |
| 128 | 129 | ||
| 129 | (defun smiley-toggle-buffer (&optional arg) | 130 | (defun smiley-toggle-buffer (&optional arg) |