annotate lisp/gnus/smiley.el @ 70:131b0175ea99 r20-0b30

Import from CVS: tag r20-0b30
author cvs
date Mon, 13 Aug 2007 09:02:59 +0200
parents ec9a17fef872
children 0d2f883870bc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 ;;; smiley.el --- displaying smiley faces
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 30
diff changeset
2 ;; Copyright (C) 1996 Free Software Foundation, Inc.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4 ;; Author: Wes Hardaker <hardaker@ece.ucdavis.edu>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 ;; Keywords: fun
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 ;; This file is part of GNU Emacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 ;; GNU Emacs is free software; you can redistribute it and/or modify
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 ;; it under the terms of the GNU General Public License as published by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 ;; the Free Software Foundation; either version 2, or (at your option)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 ;; any later version.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 ;; GNU Emacs is distributed in the hope that it will be useful,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 ;; GNU General Public License for more details.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 ;; You should have received a copy of the GNU General Public License
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 ;; along with GNU Emacs; see the file COPYING. If not, write to the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 ;; Boston, MA 02111-1307, USA.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 ;;; Commentary:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 ;; comments go here.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 ;;; Test smileys: :-] :-o :-) ;-) :-\ :-| :-d :-P 8-| :-(
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 ;; To use:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 ;; (require 'smiley)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 ;; (add-hook 'gnus-article-display-hook 'gnus-smiley-display t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 30
diff changeset
36 ;; The smilies were drawn by Joe Reiss <joe@jreiss.async.vt.edu>.
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
37
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 (require 'annotations)
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
39 (require 'messagexmas)
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 30
diff changeset
40 (eval-when-compile (require 'cl))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 30
diff changeset
42 (defvar smiley-data-directory (message-xmas-find-glyph-directory "smilies")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 30
diff changeset
43 "Location of the smiley faces files.")
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 30
diff changeset
45 ;; Notice the subtle differences in the regular expessions in the two alists below
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
46
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 30
diff changeset
47 (defvar smiley-deformed-regexp-alist
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
48 '(("\\(:-*[<«]+\\)\\W" 1 "FaceAngry.xpm")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
49 ("\\(:-+\\]+\\)\\W" 1 "FaceGoofy.xpm")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
50 ("\\(:-*D\\)\\W" 1 "FaceGrinning.xpm")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
51 ("\\(:-*[)>}»]+\\)\\W" 1 "FaceHappy.xpm")
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 30
diff changeset
52 ("\\(:-*[/\\\"]\\)[^/]" 1 "FaceIronic.xpm")
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
53 ("\\([8|]-*[|Oo%]\\)\\W" 1 "FaceKOed.xpm")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
54 ("\\([:|]-*#+\\)\\W" 1 "FaceNyah.xpm")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
55 ("\\(:-*[({]+\\)\\W" 1 "FaceSad.xpm")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
56 ("\\(:-*[Oo\*]\\)\\W" 1 "FaceStartled.xpm")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
57 ("\\(:-*|\\)\\W" 1 "FaceStraight.xpm")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
58 ("\\(:-*p\\)\\W" 1 "FaceTalking.xpm")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
59 ("\\(:-*d\\)\\W" 1 "FaceTasty.xpm")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
60 ("\\(;-*[>)}»]+\\)\\W" 1 "FaceWinking.xpm")
30
ec9a17fef872 Import from CVS: tag r19-15b98
cvs
parents: 18
diff changeset
61 ("\\(:-*[Vvµ]\\)\\W" 1 "FaceWry.xpm")
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
62 ("\\([:|]-*P\\)\\W" 1 "FaceYukky.xpm"))
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 30
diff changeset
63 "Normal and deformed faces for smilies.")
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
64
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 30
diff changeset
65 (defvar smiley-nosey-regexp-alist
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
66 '(("\\(:-+[<«]+\\)\\W" 1 "FaceAngry.xpm")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
67 ("\\(:-+\\]+\\)\\W" 1 "FaceGoofy.xpm")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
68 ("\\(:-+D\\)\\W" 1 "FaceGrinning.xpm")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
69 ("\\(:-+[}»]+\\)\\W" 1 "FaceHappy.xpm")
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 30
diff changeset
70 ("\\(:-*)+\\)\\W" 1 "FaceHappy.xpm") ;; The exception that confirms the rule
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
71 ("\\(:-+[/\\\"]+\\)\\W" 1 "FaceIronic.xpm")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
72 ("\\([8|]-+[|Oo%]\\)\\W" 1 "FaceKOed.xpm")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
73 ("\\([:|]-+#+\\)\\W" 1 "FaceNyah.xpm")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
74 ("\\(:-+[({]+\\)\\W" 1 "FaceSad.xpm")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
75 ("\\(:-+[Oo\*]\\)\\W" 1 "FaceStartled.xpm")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
76 ("\\(:-+|\\)\\W" 1 "FaceStraight.xpm")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
77 ("\\(:-+p\\)\\W" 1 "FaceTalking.xpm")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
78 ("\\(:-+d\\)\\W" 1 "FaceTasty.xpm")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
79 ("\\(;-+[>)}»]+\\)\\W" 1 "FaceWinking.xpm")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
80 ("\\(:-+[Vvµ]\\)\\W" 1 "FaceWry.xpm")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
81 ("\\([:|]-+P\\)\\W" 1 "FaceYukky.xpm"))
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 30
diff changeset
82 "Smileys with noses. These get less false matches.")
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
83
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 30
diff changeset
84 (defvar smiley-regexp-alist smiley-deformed-regexp-alist
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
85 "A list of regexps to map smilies to real images.
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 30
diff changeset
86 Defaults to the content of smiley-deformed-regexp-alist.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 30
diff changeset
87 An alternative smiley-nose-regexp-alist that
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 30
diff changeset
88 matches less aggresively is available.")
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 30
diff changeset
90 (defvar smiley-flesh-color "yellow"
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 30
diff changeset
91 "Flesh color.")
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 30
diff changeset
93 (defvar smiley-features-color "black"
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 30
diff changeset
94 "Features color.")
16
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 2
diff changeset
95
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 30
diff changeset
96 (defvar smiley-tongue-color "red"
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 30
diff changeset
97 "Tongue color.")
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 30
diff changeset
99 (defvar smiley-circle-color "black"
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 30
diff changeset
100 "Circle color.")
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102 (defvar smiley-glyph-cache nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103 (defvar smiley-running-xemacs (string-match "XEmacs" emacs-version))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105 (defun smiley-create-glyph (smiley pixmap)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106 (and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107 smiley-running-xemacs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108 (or
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109 (cdr-safe (assoc pixmap smiley-glyph-cache))
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 30
diff changeset
110 (let* ((xpm-color-symbols
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111 (and (featurep 'xpm)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112 (append `(("flesh" ,smiley-flesh-color)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
113 ("features" ,smiley-features-color)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114 ("tongue" ,smiley-tongue-color))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115 xpm-color-symbols)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116 (glyph (make-glyph
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117 (list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118 (cons 'x (expand-file-name pixmap smiley-data-directory))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119 (cons 'tty smiley)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120 (setq smiley-glyph-cache (cons (cons pixmap glyph) smiley-glyph-cache))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121 (set-glyph-face glyph 'default)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122 glyph))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
124 ;;;###autoload
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125 (defun smiley-region (beg end)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
126 "Smilify the region between point and mark."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
127 (interactive "r")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128 (smiley-buffer (current-buffer) beg end))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
130 ;;;###autoload
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
131 (defun smiley-buffer (&optional buffer st nd)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132 (interactive)
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
133 (when (featurep 'x)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
134 (save-excursion
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
135 (when buffer
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
136 (set-buffer buffer))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
137 (let ((buffer-read-only nil)
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 30
diff changeset
138 (alist smiley-regexp-alist)
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
139 entry regexp beg group file)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
140 (goto-char (or st (point-min)))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
141 (setq beg (point))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
142 ;; loop through alist
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
143 (while (setq entry (pop alist))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
144 (setq regexp (car entry)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
145 group (cadr entry)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
146 file (caddr entry))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
147 (goto-char beg)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
148 (while (re-search-forward regexp nd t)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
149 (let* ((start (match-beginning group))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
150 (end (match-end group))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
151 (glyph (smiley-create-glyph (buffer-substring start end)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
152 file)))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
153 (when glyph
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
154 (mapcar 'delete-annotation (annotations-at end))
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 30
diff changeset
155 (let ((ext (make-extent start end)))
16
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 2
diff changeset
156 (set-extent-property ext 'invisible t)
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 30
diff changeset
157 (set-extent-property ext 'end-open t)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 30
diff changeset
158 (set-extent-property ext 'intangible t))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 30
diff changeset
159 (make-annotation glyph end 'text)
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
160 (when (smiley-end-paren-p start end)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
161 (make-annotation ")" end 'text))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
162 (goto-char end)))))))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
163
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
164 (defun smiley-end-paren-p (start end)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
165 "Try to guess whether the current smiley is an end-paren smiley."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
166 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
167 (goto-char start)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
168 (when (and (re-search-backward "[()]" nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
169 (= (following-char) ?\()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
170 (goto-char end)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
171 (or (not (re-search-forward "[()]" nil t))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
172 (= (char-after (1- (point))) ?\()))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
173 t)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
174
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 30
diff changeset
175 ;;;###autoload
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
176 (defun gnus-smiley-display ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
177 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
178 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
179 (set-buffer gnus-article-buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
180 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
181 ;; We skip the headers.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
182 (unless (search-forward "\n\n" nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
183 (goto-char (point-max)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
184 (smiley-buffer (current-buffer) (point))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
185
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
186 (provide 'smiley)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
187
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
188 ;;; smiley.el ends here