Mercurial > emacs
comparison lisp/gnus/gnus-audio.el @ 89971:cce1c0ee76ee
Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-36
Merge from emacs--cvs-trunk--0, emacs--gnus--5.10, gnus--rel--5.10
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Merge from emacs--gnus--5.10, gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-524
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-534
Update from CVS
* 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 | Thu, 09 Sep 2004 09:36:36 +0000 |
parents | 561b856c5b1f 55fd4f77387a |
children | f9a65d7ebd29 |
comparison
equal
deleted
inserted
replaced
89970:a849e5779b8c | 89971:cce1c0ee76ee |
---|---|
1 ;;; gnus-audio.el --- sound effects for Gnus | 1 ;;; gnus-audio.el --- Sound effects for Gnus |
2 ;; Copyright (C) 1996, 2000 Free Software Foundation | 2 ;; Copyright (C) 1996, 2000, 2003 Free Software Foundation |
3 | 3 |
4 ;; Author: Steven L. Baur <steve@miranova.com> | 4 ;; Author: Steven L. Baur <steve@miranova.com> |
5 ;; Keywords: news, mail, multimedia | 5 ;; Keywords: news, mail, multimedia |
6 | 6 |
7 ;; This file is part of GNU Emacs. | 7 ;; This file is part of GNU Emacs. |
45 (defcustom gnus-audio-directory (nnheader-find-etc-directory "sounds") | 45 (defcustom gnus-audio-directory (nnheader-find-etc-directory "sounds") |
46 "The directory containing the Sound Files." | 46 "The directory containing the Sound Files." |
47 :type '(choice directory (const nil)) | 47 :type '(choice directory (const nil)) |
48 :group 'gnus-audio) | 48 :group 'gnus-audio) |
49 | 49 |
50 (defcustom gnus-audio-au-player "/usr/bin/showaudio" | 50 (defcustom gnus-audio-au-player (executable-find "play") |
51 "Executable program for playing sun AU format sound files." | 51 "Executable program for playing sun AU format sound files." |
52 :group 'gnus-audio | 52 :group 'gnus-audio |
53 :type 'string) | 53 :type '(choice file (const nil))) |
54 | 54 |
55 (defcustom gnus-audio-wav-player "/usr/local/bin/play" | 55 (defcustom gnus-audio-wav-player (executable-find "play") |
56 "Executable program for playing WAV files." | 56 "Executable program for playing WAV files." |
57 :group 'gnus-audio | 57 :group 'gnus-audio |
58 :type 'string) | 58 :type '(choice file (const nil))) |
59 | 59 |
60 ;;; The following isn't implemented yet. Wait for Millennium Gnus. | 60 ;;; The following isn't implemented yet. Wait for Millennium Gnus. |
61 ;;(defvar gnus-audio-effects-enabled t | 61 ;;(defvar gnus-audio-effects-enabled t |
62 ;; "When t, Gnus will use sound effects.") | 62 ;; "When t, Gnus will use sound effects.") |
63 ;;(defvar gnus-audio-enable-hooks nil | 63 ;;(defvar gnus-audio-enable-hooks nil |
91 ;; (gnus-run-hooks gnus-audio-disable-hooks)) | 91 ;; (gnus-run-hooks gnus-audio-disable-hooks)) |
92 | 92 |
93 ;;;###autoload | 93 ;;;###autoload |
94 (defun gnus-audio-play (file) | 94 (defun gnus-audio-play (file) |
95 "Play a sound FILE through the speaker." | 95 "Play a sound FILE through the speaker." |
96 (interactive) | 96 (interactive "fSound file name: ") |
97 (let ((sound-file (if (file-exists-p file) | 97 (let ((sound-file (if (file-exists-p file) |
98 file | 98 file |
99 (expand-file-name file gnus-audio-directory)))) | 99 (expand-file-name file gnus-audio-directory)))) |
100 (when (file-exists-p sound-file) | 100 (when (file-exists-p sound-file) |
101 (cond ((and gnus-audio-inline-sound | 101 (cond ((and gnus-audio-inline-sound |