Mercurial > emacs
comparison lisp/gnus/earcon.el @ 56927:55fd4f77387a after-merge-gnus-5_10
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Merge from emacs--gnus--5.10, gnus--rel--5.10
Patches applied:
* miles@gnu.org--gnu-2004/emacs--gnus--5.10--base-0
tag of miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-464
* miles@gnu.org--gnu-2004/emacs--gnus--5.10--patch-1
Import from CVS branch gnus-5_10-branch
* miles@gnu.org--gnu-2004/emacs--gnus--5.10--patch-2
Merge from lorentey@elte.hu--2004/emacs--multi-tty--0, emacs--cvs-trunk--0
* miles@gnu.org--gnu-2004/emacs--gnus--5.10--patch-3
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--gnus--5.10--patch-4
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-18
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-19
Remove autoconf-generated files from archive
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-20
Update from CVS
author | Miles Bader <miles@gnu.org> |
---|---|
date | Sat, 04 Sep 2004 13:13:48 +0000 |
parents | 695cf19ef79e |
children | 18a818a2ee7c cce1c0ee76ee |
comparison
equal
deleted
inserted
replaced
56926:f8e248e9a717 | 56927:55fd4f77387a |
---|---|
1 ;;; earcon.el --- sound effects for messages | 1 ;;; earcon.el --- Sound effects for messages |
2 | 2 |
3 ;; Copyright (C) 1996, 2000, 2001 Free Software Foundation | 3 ;; Copyright (C) 1996, 2000, 2001, 2003 Free Software Foundation |
4 | 4 |
5 ;; Author: Steven L. Baur <steve@miranova.com> | 5 ;; Author: Steven L. Baur <steve@miranova.com> |
6 | 6 |
7 ;; This file is part of GNU Emacs. | 7 ;; This file is part of GNU Emacs. |
8 | 8 |
18 | 18 |
19 ;; You should have received a copy of the GNU General Public License | 19 ;; You should have received a copy of the GNU General Public License |
20 ;; along with GNU Emacs; see the file COPYING. If not, write to the | 20 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
21 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 21 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
22 ;; Boston, MA 02111-1307, USA. | 22 ;; Boston, MA 02111-1307, USA. |
23 ;; This file is part of GNU Emacs. | |
24 | 23 |
25 ;;; Commentary: | 24 ;;; Commentary: |
26 | |
27 ;; This file provides access to sound effects in Gnus. | 25 ;; This file provides access to sound effects in Gnus. |
28 | 26 |
29 ;;; Code: | 27 ;;; Code: |
30 | 28 |
31 (eval-when-compile (require 'cl)) | 29 (eval-when-compile (require 'cl)) |
50 (defcustom earcon-regexp-alist | 48 (defcustom earcon-regexp-alist |
51 '(("boring" 1 "Boring.au") | 49 '(("boring" 1 "Boring.au") |
52 ("evil[ \t]+laugh" 1 "Evil_Laugh.au") | 50 ("evil[ \t]+laugh" 1 "Evil_Laugh.au") |
53 ("gag\\|puke" 1 "Puke.au") | 51 ("gag\\|puke" 1 "Puke.au") |
54 ("snicker" 1 "Snicker.au") | 52 ("snicker" 1 "Snicker.au") |
55 ("meow" 1 "catmeow.au") | 53 ("meow" 1 "catmeow.wav") |
56 ("sob\\|boohoo" 1 "cry.wav") | 54 ("sob\\|boohoo" 1 "cry.wav") |
57 ("drum[ \t]*roll" 1 "drumroll.au") | 55 ("drum[ \t]*roll" 1 "drumroll.au") |
58 ("blast" 1 "explosion.au") | 56 ("blast" 1 "explosion.au") |
59 ("flush\\|plonk!*" 1 "flush.au") | 57 ("flush\\|plonk!*" 1 "flush.au") |
60 ("kiss" 1 "kiss.wav") | 58 ("kiss" 1 "kiss.wav") |
78 If the text under the mouse pointer has a `earcon-callback' property, | 76 If the text under the mouse pointer has a `earcon-callback' property, |
79 call it with the value of the `earcon-data' text property." | 77 call it with the value of the `earcon-data' text property." |
80 (interactive "e") | 78 (interactive "e") |
81 (set-buffer (window-buffer (posn-window (event-start event)))) | 79 (set-buffer (window-buffer (posn-window (event-start event)))) |
82 (let* ((pos (posn-point (event-start event))) | 80 (let* ((pos (posn-point (event-start event))) |
83 (data (get-text-property pos 'earcon-data)) | 81 (data (get-text-property pos 'earcon-data)) |
84 (fun (get-text-property pos 'earcon-callback))) | 82 (fun (get-text-property pos 'earcon-callback))) |
85 (if fun (funcall fun data)))) | 83 (if fun (funcall fun data)))) |
86 | 84 |
87 (defun earcon-article-press-button () | 85 (defun earcon-article-press-button () |
88 "Check text at point for a callback function. | 86 "Check text at point for a callback function. |