Gnus development mailing list
 help / color / mirror / Atom feed
From: Jan Vroonhof <vroonhof@math.ethz.ch>
Cc: ding@ifi.uio.no
Subject: Smileys again...
Date: 15 Jul 1996 19:35:51 +0200	[thread overview]
Message-ID: <bybuhh1kso.fsf@math.ethz.ch> (raw)
In-Reply-To: Lars Magne Ingebrigtsen's message of 14 Jul 1996 20:01:48 +0200

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3892 bytes --]


The following fixes the two aggressive matching of "://" in 5.2.35 and
adds some more mild regexps such that you can read Tom Cristiansen's
messsages.

Patch follows

*** ChangeLog.orig	Sun Jul 14 18:44:48 1996
--- ChangeLog	Mon Jul 15 19:21:23 1996
***************
*** 1,3 ****
--- 1,8 ----
+ Mon Jul 15 18:11:13 1996  Jan Vroonhof  <vroonhof@math.ethz.ch (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  <larsi@ifi.uio.no>
  
  	* gnus-uu.el (gnus-uu-mark-over): Would bug out.
*** smiley.el.orig	Sun Jul 14 18:40:45 1996
--- smiley.el	Mon Jul 15 19:20:08 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,65 ****
      ("\\(;-*[>)}»]+\\)\\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,92 ----
      ("\\(;-*[>)}»]+\\)\\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.")
  


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


  reply	other threads:[~1996-07-15 17:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-07-14 18:01 Gnus v5.2.35 is released Lars Magne Ingebrigtsen
1996-07-15 17:35 ` Jan Vroonhof [this message]
1996-07-16 22:08   ` Smileys again Danny Siu
1996-07-17 13:55     ` Jan Vroonhof
1996-07-16 18:15 ` Gnus v5.2.35 is released Mark Eichin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bybuhh1kso.fsf@math.ethz.ch \
    --to=vroonhof@math.ethz.ch \
    --cc=ding@ifi.uio.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).