Gnus development mailing list
 help / color / mirror / Atom feed
From: Oliver Scholz <oscholz@my.gnus.org>
Subject: smiley-ems.el
Date: Wed, 31 Oct 2001 22:25:18 +0100	[thread overview]
Message-ID: <m3ofmnsds1.fsf@ID-87814.user.dfncis.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 227 bytes --]

There have been questions on how to use one's own smilies in
gnu.emacs.gnus.

I think, it would be nice to ease the customization. Smiley-ems.el
could specify the image type in use via a variable. This simple patch
adds this:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: smiley-ems.diff --]
[-- Type: text/x-patch, Size: 729 bytes --]

--- smiley-ems.el	Wed Oct 31 22:01:44 2001
+++ bin/emacs-lisp/smiley-ems.el	Wed Oct 31 21:57:28 2001
@@ -48,6 +48,13 @@
   :type 'directory
   :group 'smiley)
 
+
+(defcustom smiley-image-type 'pbm
+  "Image format of the smiley images."
+  :type 'symbol
+  :group 'smiley)
+
+
 ;; The XEmacs version has a baroque, if not rococo, set of these.
 (defcustom smiley-regexp-alist
   '(("\\(:-?)\\)\\W" 1 "smile.pbm")
@@ -75,7 +82,7 @@
 		   (symbol-value smiley-regexp-alist)
 		 smiley-regexp-alist))
     (let* ((data-directory smiley-data-directory)
-	   (image (find-image (list (list :type 'pbm
+	   (image (find-image (list (list :type smiley-image-type
 					  :file (nth 2 elt)
 					  :ascent 'center)))))
       (if image

[-- Attachment #3: Type: text/plain, Size: 116 bytes --]


I have made a few simple yellow xpm smilies on a lazy sunday
afternoon. If you like them, you can have them. :-)



[-- Attachment #4: smilies.tar.gz --]
[-- Type: application/x-gunzip, Size: 631 bytes --]

[-- Attachment #5: Type: text/plain, Size: 614 bytes --]


To use them the user can simply insert ...

(setq smiley-regexp-alist '(("\\(:-?)\\)\\W" 1 "smile.xpm")
			    ("\\(;-?)\\)\\W" 1 "blink.xpm")
			    ("\\(:-[/\\]\\)\\W" 1 "wry.xpm")
			    ("\\(:-(\\)\\W" 1 "sad.xpm")
			    ("\\(:-{\\)\\W" 1 "frown.xpm")
			    ("\\(:->\\)\\W" 1 "evil.xpm")
			    ("\\(8-)\\)\\W" 1 "braindamaged.xpm")
			    ("\\(:-|\\)\\W" 1 "indifferent.xpm")
			    ("\\(#-)\\)\\W" 1 "dead.xpm")
			    ("\\(:-]\\)\\W" 1 "forced.xpm")))


(setq smiley-image-type 'xpm)

... into his or her .gnus.

    'oliver

-- 
Oliver Scholz
Taunusstr. 25
60329 Frankfurt am Main
Tel. 069  97 40 99 42

             reply	other threads:[~2001-10-31 21:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-31 21:25 Oliver Scholz [this message]
2001-10-31 23:25 ` smiley-ems.el ShengHuo ZHU
2001-11-01 16:35   ` smiley-ems.el Pavel Janík
2001-11-01 19:04   ` smiley-ems.el ShengHuo ZHU
2001-11-02  8:42     ` smiley-ems.el Jaap-Henk Hoepman

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=m3ofmnsds1.fsf@ID-87814.user.dfncis.de \
    --to=oscholz@my.gnus.org \
    /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).