Mercurial > emacs
comparison lisp/gnus/gnus-audio.el @ 82951:0fde48feb604
Import Gnus 5.10 from the v5_10 branch of the Gnus repository.
author | Andreas Schwab <schwab@suse.de> |
---|---|
date | Thu, 22 Jul 2004 16:45:51 +0000 |
parents | 695cf19ef79e |
children | 18a818a2ee7c cce1c0ee76ee |
comparison
equal
deleted
inserted
replaced
56503:8bbd2323fbf2 | 82951:0fde48feb604 |
---|---|
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 |