Gnus development mailing list
 help / color / mirror / Atom feed
* smiley-ems.el
@ 2001-10-31 21:25 Oliver Scholz
  2001-10-31 23:25 ` smiley-ems.el ShengHuo ZHU
  0 siblings, 1 reply; 5+ messages in thread
From: Oliver Scholz @ 2001-10-31 21:25 UTC (permalink / 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-11-02  8:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-31 21:25 smiley-ems.el Oliver Scholz
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

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