Danny Siu writes: > Jan> The following fixes the too aggressive matching of "://" in 5.2.35 > Jan> and adds some more mild regexps such that you can read Tom > Jan> Cristiansen's messsages. > > The patch looks good except the :// regexp matches also http://blahblah... > A smiley in a URL is incorrect at all.... d*mn, that was exactly the main problem I was trying to fix. Here is the right version of the patch (against 5.2.36): *** ChangeLog.orig Tue Jul 16 22:20:15 1996 --- ChangeLog Wed Jul 17 15:46:29 1996 *************** *** 1,3 **** --- 1,8 ---- + Wed Jul 17 15:44:51 1996 Jan Vroonhof + + * smiley.el (smiley-deformed-regexp-alist): Fix for matching + 'http://' had the wrong slashes. + Tue Jul 16 20:05:49 1996 Lars Magne Ingebrigtsen * message.el (message-send-mail): Bugged out under Emacs. *************** *** 9,14 **** --- 14,24 ---- Sun Jul 14 20:01:26 1996 Lars Magne Ingebrigtsen * gnus.el: Gnus v5.2.35 is released. + + Mon Jul 15 18:11:13 1996 Jan Vroonhof + + * smiley.el (smiley-regexp-alist): Don't match important parts of URLs + (smiley-nosey-regexp-alist): New variable. Sun Jul 14 18:21:14 1996 Lars Magne Ingebrigtsen *** smiley.el.orig Sun Jul 14 18:40:45 1996 --- smiley.el Wed Jul 17 15:45:09 1996 *************** *** 42,53 **** (defvar smiley-data-directory (message-xmas-find-glyph-directory "smilies") "Location of the smiley faces files.") ! (defvar smiley-regexp-alist '(("\\(:-*[<«]+\\)\\W" 1 "FaceAngry.xpm") ("\\(:-+\\]+\\)\\W" 1 "FaceGoofy.xpm") ("\\(:-*D\\)\\W" 1 "FaceGrinning.xpm") ("\\(:-*[)>}»]+\\)\\W" 1 "FaceHappy.xpm") ! ("\\(:-*[/\\\"]+\\)\\W" 1 "FaceIronic.xpm") ("\\([8|]-*[|Oo%]\\)\\W" 1 "FaceKOed.xpm") ("\\([:|]-*#+\\)\\W" 1 "FaceNyah.xpm") ("\\(:-*[({]+\\)\\W" 1 "FaceSad.xpm") --- 42,55 ---- (defvar smiley-data-directory (message-xmas-find-glyph-directory "smilies") "Location of the smiley faces files.") ! ;; Notice the subtle differences in the regular expessions in the two alists below ! ! (defvar smiley-deformed-regexp-alist '(("\\(:-*[<«]+\\)\\W" 1 "FaceAngry.xpm") ("\\(:-+\\]+\\)\\W" 1 "FaceGoofy.xpm") ("\\(:-*D\\)\\W" 1 "FaceGrinning.xpm") ("\\(:-*[)>}»]+\\)\\W" 1 "FaceHappy.xpm") ! ("\\(:-*[/\\\"]\\)[^//]" 1 "FaceIronic.xpm") ("\\([8|]-*[|Oo%]\\)\\W" 1 "FaceKOed.xpm") ("\\([:|]-*#+\\)\\W" 1 "FaceNyah.xpm") ("\\(:-*[({]+\\)\\W" 1 "FaceSad.xpm") *************** *** 58,64 **** ("\\(;-*[>)}»]+\\)\\W" 1 "FaceWinking.xpm") ("\\(:-*[Vvµ]\\)\\W" 1 "FaceWry.xpm") ("\\([:|]-*P\\)\\W" 1 "FaceYukky.xpm")) ! "A list of regexps to map smilies to real images.") (defvar smiley-flesh-color "yellow" "Flesh color.") --- 60,91 ---- ("\\(;-*[>)}»]+\\)\\W" 1 "FaceWinking.xpm") ("\\(:-*[Vvµ]\\)\\W" 1 "FaceWry.xpm") ("\\([:|]-*P\\)\\W" 1 "FaceYukky.xpm")) ! "Normal and deformed faces for smilies.") ! ! (defvar smiley-nosey-regexp-alist ! '(("\\(:-+[<«]+\\)\\W" 1 "FaceAngry.xpm") ! ("\\(:-+\\]+\\)\\W" 1 "FaceGoofy.xpm") ! ("\\(:-+D\\)\\W" 1 "FaceGrinning.xpm") ! ("\\(:-+[}»]+\\)\\W" 1 "FaceHappy.xpm") ! ("\\(:-*)+\\)\\W" 1 "FaceHappy.xpm") ;; The exception that confirms the rule ! ("\\(:-+[/\\\"]+\\)\\W" 1 "FaceIronic.xpm") ! ("\\([8|]-+[|Oo%]\\)\\W" 1 "FaceKOed.xpm") ! ("\\([:|]-+#+\\)\\W" 1 "FaceNyah.xpm") ! ("\\(:-+[({]+\\)\\W" 1 "FaceSad.xpm") ! ("\\(:-+[Oo\*]\\)\\W" 1 "FaceStartled.xpm") ! ("\\(:-+|\\)\\W" 1 "FaceStraight.xpm") ! ("\\(:-+p\\)\\W" 1 "FaceTalking.xpm") ! ("\\(:-+d\\)\\W" 1 "FaceTasty.xpm") ! ("\\(;-+[>)}»]+\\)\\W" 1 "FaceWinking.xpm") ! ("\\(:-+[Vvµ]\\)\\W" 1 "FaceWry.xpm") ! ("\\([:|]-+P\\)\\W" 1 "FaceYukky.xpm")) ! "Smileys with noses. These get less false matches.") ! ! (defvar smiley-regexp-alist smiley-deformed-regexp-alist ! "A list of regexps to map smilies to real images. ! Defaults to the content of smiley-deformed-regexp-alist. ! An alternative smiley-nose-regexp-alist that ! matches less aggresively is available.") (defvar smiley-flesh-color "yellow" "Flesh color.") Greetings, Jan P.S. Should the "nosey" verion match ":)" it still gives some false matches, but a quick look in rec.humor showed that it is used a lot. -- Jan Vroonhof http://www.math.ethz.ch/~vroonhof/ Mathematik, vroonhof@math.ethz.ch HG E16, ETH-Zentrum, Tel: +41-1-6325456/25154 Raemistrasse 101, CH-8092 Zuerich. Fax: +41-1-6321085