X-Git-Url: https://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fgnus-audio.el;h=f3bb686d8c98b432d457973dc0f179c05cb0090f;hb=0a4638ac9f2eb076e478cf5f99ff8afc308cdbbd;hp=af9e00a04fd78f8234e4c6488dc5610f19c333a5;hpb=459083190baefc88bde0b06142d7c2727dcaa3c4;p=gnus diff --git a/lisp/gnus-audio.el b/lisp/gnus-audio.el index af9e00a04..f3bb686d8 100644 --- a/lisp/gnus-audio.el +++ b/lisp/gnus-audio.el @@ -2,7 +2,6 @@ ;; Copyright (C) 1996 Free Software Foundation ;; Author: Steven L. Baur -;; Keywords: news ;; This file is part of GNU Emacs. @@ -24,11 +23,11 @@ ;;; Commentary: ;; This file provides access to sound effects in Gnus. ;; Prerelease: This file is partially stripped to support earcons.el -;; You can safely ignore most of it until Red Gnus. **Evil Laugh** +;; You can safely ignore most of it until Red Gnus. **Evil Laugh** ;;; Code: -(if (null (boundp 'running-xemacs)) - (defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version))) +(when (null (boundp 'running-xemacs)) + (defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version))) (require 'nnheader) (eval-when-compile (require 'cl)) @@ -42,12 +41,12 @@ "The directory containing the Sound Files.") (defvar gnus-audio-au-player "/usr/bin/showaudio" - "Executable program for playing sun AU format sound files") -(defvar gnus-audio-wav-player "/usr/local/bin/play" - "Executable program for playing WAV files") + "Executable program for playing sun AU format sound files.") +(defvar gnus-audio-wav-player "/usr/local/bin/play" + "Executable program for playing WAV files.") -;;; The following isn't implemented yet. Wait for Red Gnus. +;;; The following isn't implemented yet. Wait for Millennium Gnus. ;(defvar gnus-audio-effects-enabled t ; "When t, Gnus will use sound effects.") ;(defvar gnus-audio-enable-hooks nil @@ -67,18 +66,18 @@ ;;;###autoload -;(defun gnus-audio-enable-sound () + ;(defun gnus-audio-enable-sound () ; "Enable Sound Effects for Gnus." ; (interactive) ; (setq gnus-audio-effects-enabled t) -; (run-hooks gnus-audio-enable-hooks)) +; (gnus-run-hooks gnus-audio-enable-hooks)) ;;;###autoload -;(defun gnus-audio-disable-sound () + ;(defun gnus-audio-disable-sound () ; "Disable Sound Effects for Gnus." ; (interactive) ; (setq gnus-audio-effects-enabled nil) -; (run-hooks gnus-audio-disable-hooks)) +; (gnus-run-hooks gnus-audio-disable-hooks)) ;;;###autoload (defun gnus-audio-play (file) @@ -89,21 +88,23 @@ (concat gnus-audio-directory file)))) (when (file-exists-p sound-file) (if gnus-audio-inline-sound - (play-sound-file (concat gnus-audio-directory sound-file)) + (play-sound-file sound-file) (cond ((string-match "\\.wav$" sound-file) (call-process gnus-audio-wav-player - (concat gnus-audio-directory sound-file) + sound-file 0 - nil)) + nil + sound-file)) ((string-match "\\.au$" sound-file) (call-process gnus-audio-au-player - (concat gnus-audio-directory sound-file) + sound-file 0 - nil))))))) + nil + sound-file))))))) ;;; The following isn't implemented yet, wait for Red Gnus -;(defun gnus-audio-startrek-sounds () + ;(defun gnus-audio-startrek-sounds () ; "Enable sounds from Star Trek the original series." ; (interactive) ; (setq gnus-audio-busy-sound "working.au")