;; The XEmacs version has a baroque, if not rococo, set of these.
(defcustom smiley-regexp-alist
;; Perhaps :-) should be distinct -- it does appear in the Jargon File.
- '(("\\([:;]-?)\\)\\W" 1 "smile.pbm")
- ("\\(:-[/\\]\\)\\W" 1 "wry.pbm")
- ("\\(:-[({]\\)\\W" 1 "frown.pbm"))
+ '(("\\([:;]-?)\\)\\(\\W\\|\\'\\)" 1 "smile.pbm")
+ ("\\(:-[/\\]\\)\\(\\W\\|\\'\\)" 1 "wry.pbm")
+ ("\\(:-[({]\\)\\(\\W\\|\\'\\)" 1 "frown.pbm"))
"*A list of regexps to map smilies to images.
The elements are (REGEXP MATCH FILE), where MATCH is the submatch in
rgexp to replace with IMAGE. IMAGE is the name of a PBM file in
(smiley-update-cache))
(save-excursion
(let ((beg (or start (point-min)))
+ (inhibit-point-motion-hooks t)
group overlay image)
(dolist (entry smiley-cached-regexp-alist)
(setq group (nth 1 entry)
(overlay-put overlay 'smiley t)
(overlay-put overlay
'help-echo "mouse-2: toggle smilies in buffer")
- (overlay-put overlay 'keymap smiley-mouse-map))))))
+ (overlay-put overlay 'keymap smiley-mouse-map)
+ (goto-char (match-end group)))))))
(setq smiley-active t)))
(defun smiley-toggle-buffer (&optional arg)
(eval-when-compile (defvar gnus-article-buffer))
(defun gnus-smiley-display (&optional arg)
- "Display textual emoticaons (\"smilies\") as small graphical icons.
+ "Display textual emoticons (\"smilies\") as small graphical icons.
With arg, turn displaying on if and only if arg is positive."
(interactive "P")
(save-excursion
(provide 'smiley)
+;;; arch-tag: e726728a-14fb-4e6a-9aef-889941bdf7ad
;;; smiley-ems.el ends here