Mercurial > emacs
comparison lisp/gnus/gnus-audio.el @ 88155:d7ddb3e565de
sync with trunk
author | Henrik Enberg <henrik.enberg@telia.com> |
---|---|
date | Mon, 16 Jan 2006 00:03:54 +0000 |
parents | a26d9b55abb6 |
children |
comparison
equal
deleted
inserted
replaced
88154:8ce476d3ba36 | 88155:d7ddb3e565de |
---|---|
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 |
3 ;; Copyright (C) 1996, 2000, 2002, 2003, 2004, | |
4 ;; 2005 Free Software Foundation, Inc. | |
3 | 5 |
4 ;; Author: Steven L. Baur <steve@miranova.com> | 6 ;; Author: Steven L. Baur <steve@miranova.com> |
5 ;; Keywords: news, mail, multimedia | 7 ;; Keywords: news, mail, multimedia |
6 | 8 |
7 ;; This file is part of GNU Emacs. | 9 ;; This file is part of GNU Emacs. |
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17 ;; GNU General Public License for more details. | 19 ;; GNU General Public License for more details. |
18 | 20 |
19 ;; You should have received a copy of the GNU General Public License | 21 ;; 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 | 22 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
21 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 23 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
22 ;; Boston, MA 02111-1307, USA. | 24 ;; Boston, MA 02110-1301, USA. |
23 | 25 |
24 ;;; Commentary: | 26 ;;; Commentary: |
25 | 27 |
26 ;; This file provides access to sound effects in Gnus. | 28 ;; This file provides access to sound effects in Gnus. |
27 ;; This file is partially stripped to support earcons.el. | 29 ;; This file is partially stripped to support earcons.el. |
45 (defcustom gnus-audio-directory (nnheader-find-etc-directory "sounds") | 47 (defcustom gnus-audio-directory (nnheader-find-etc-directory "sounds") |
46 "The directory containing the Sound Files." | 48 "The directory containing the Sound Files." |
47 :type '(choice directory (const nil)) | 49 :type '(choice directory (const nil)) |
48 :group 'gnus-audio) | 50 :group 'gnus-audio) |
49 | 51 |
50 (defcustom gnus-audio-au-player "/usr/bin/showaudio" | 52 (defcustom gnus-audio-au-player (executable-find "play") |
51 "Executable program for playing sun AU format sound files." | 53 "Executable program for playing sun AU format sound files." |
52 :group 'gnus-audio | 54 :group 'gnus-audio |
53 :type 'string) | 55 :type '(choice file (const nil))) |
54 | 56 |
55 (defcustom gnus-audio-wav-player "/usr/local/bin/play" | 57 (defcustom gnus-audio-wav-player (executable-find "play") |
56 "Executable program for playing WAV files." | 58 "Executable program for playing WAV files." |
57 :group 'gnus-audio | 59 :group 'gnus-audio |
58 :type 'string) | 60 :type '(choice file (const nil))) |
59 | 61 |
60 ;;; The following isn't implemented yet. Wait for Millennium Gnus. | 62 ;;; The following isn't implemented yet. Wait for Millennium Gnus. |
61 ;;(defvar gnus-audio-effects-enabled t | 63 ;;(defvar gnus-audio-effects-enabled t |
62 ;; "When t, Gnus will use sound effects.") | 64 ;; "When t, Gnus will use sound effects.") |
63 ;;(defvar gnus-audio-enable-hooks nil | 65 ;;(defvar gnus-audio-enable-hooks nil |
91 ;; (gnus-run-hooks gnus-audio-disable-hooks)) | 93 ;; (gnus-run-hooks gnus-audio-disable-hooks)) |
92 | 94 |
93 ;;;###autoload | 95 ;;;###autoload |
94 (defun gnus-audio-play (file) | 96 (defun gnus-audio-play (file) |
95 "Play a sound FILE through the speaker." | 97 "Play a sound FILE through the speaker." |
96 (interactive) | 98 (interactive "fSound file name: ") |
97 (let ((sound-file (if (file-exists-p file) | 99 (let ((sound-file (if (file-exists-p file) |
98 file | 100 file |
99 (expand-file-name file gnus-audio-directory)))) | 101 (expand-file-name file gnus-audio-directory)))) |
100 (when (file-exists-p sound-file) | 102 (when (file-exists-p sound-file) |
101 (cond ((and gnus-audio-inline-sound | 103 (cond ((and gnus-audio-inline-sound |
144 | 146 |
145 (provide 'gnus-audio) | 147 (provide 'gnus-audio) |
146 | 148 |
147 (run-hooks 'gnus-audio-load-hook) | 149 (run-hooks 'gnus-audio-load-hook) |
148 | 150 |
151 ;;; arch-tag: 6f129e78-3416-4fc9-973f-6cf5ac8d654b | |
149 ;;; gnus-audio.el ends here | 152 ;;; gnus-audio.el ends here |