Remove earcon and gnus-audio.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Sun, 26 Sep 2010 01:20:05 +0000 (03:20 +0200)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Sun, 26 Sep 2010 01:20:05 +0000 (03:20 +0200)
lisp/ChangeLog
lisp/earcon.el [deleted file]
lisp/gnus-art.el
lisp/gnus-audio.el [deleted file]
lisp/gnus-cus.el
lisp/gnus.el
texi/ChangeLog
texi/gnus-news.texi
texi/gnus.texi

index 01ba06c..85c7276 100644 (file)
@@ -1,5 +1,18 @@
 2010-09-26  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * gnus.el (gnus-play-startup-jingle): Removed.
+       (gnus-splash): Don't play jingle.
+
+       * gnus-art.el (gnus-treat-play-sounds): Removed.
+
+       * gnus.el (gnus-play-jingle): Remove audio support.
+
+       * gnus-cus.el (gnus-score-customize): Remove audio reference.
+
+       * earcon.el: Removed -- no users.
+
+       * gnus-audio.el: Removed -- no users of this package.
+
        * gnus-sum.el (gnus-summary-limit-children): Remove nocem support.
 
        * gnus-start.el (gnus-setup-news): Remove nocem support.
diff --git a/lisp/earcon.el b/lisp/earcon.el
deleted file mode 100644 (file)
index 2086f86..0000000
+++ /dev/null
@@ -1,230 +0,0 @@
-;;; earcon.el --- Sound effects for messages
-
-;; Copyright (C) 1996, 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
-
-;; Author: Steven L. Baur <steve@miranova.com>
-
-;; This file is part of GNU Emacs.
-
-;; GNU Emacs is free software: you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; GNU Emacs is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
-
-;;; Commentary:
-;; This file provides access to sound effects in Gnus.
-
-;;; Code:
-
-(eval-when-compile (require 'cl))
-(require 'gnus)
-(require 'gnus-audio)
-(require 'gnus-art)
-
-(defgroup earcon nil
-  "Turn ** sounds ** into noise."
-  :group 'gnus-visual)
-
-(defcustom earcon-prefix "**"
-  "*String denoting the start of an earcon."
-  :type 'string
-  :group 'earcon)
-
-(defcustom earcon-suffix "**"
-  "String denoting the end of an earcon."
-  :type 'string
-  :group 'earcon)
-
-(defcustom earcon-regexp-alist
-  '(("boring" 1 "Boring.au")
-    ("evil[ \t]+laugh" 1 "Evil_Laugh.au")
-    ("gag\\|puke" 1 "Puke.au")
-    ("snicker" 1 "Snicker.au")
-    ("meow" 1 "catmeow.wav")
-    ("sob\\|boohoo" 1 "cry.wav")
-    ("drum[ \t]*roll" 1 "drumroll.au")
-    ("blast" 1 "explosion.au")
-    ("flush\\|plonk!*" 1 "flush.au")
-    ("kiss" 1 "kiss.wav")
-    ("tee[ \t]*hee" 1 "laugh.au")
-    ("shoot" 1 "shotgun.wav")
-    ("yawn" 1 "snore.wav")
-    ("cackle" 1 "witch.au")
-    ("yell\\|roar" 1 "yell2.au")
-    ("whoop-de-doo" 1 "whistle.au"))
-  "*A list of regexps to map earcons to real sounds."
-  :type '(repeat (list regexp
-                      (integer :tag "Match")
-                      (string :tag "Sound")))
-  :group 'earcon)
-(defvar earcon-button-marker-list nil)
-(make-variable-buffer-local 'earcon-button-marker-list)
-
-;;; FIXME!! clone of code from gnus-vis.el FIXME!!
-(defun earcon-article-push-button (event)
-  "Check text under the mouse pointer for a callback function.
-If the text under the mouse pointer has a `earcon-callback' property,
-call it with the value of the `earcon-data' text property."
-  (interactive "e")
-  (set-buffer (window-buffer (posn-window (event-start event))))
-  (let* ((pos (posn-point (event-start event)))
-        (data (get-text-property pos 'earcon-data))
-        (fun (get-text-property pos 'earcon-callback)))
-    (if fun (funcall fun data))))
-
-(defun earcon-article-press-button ()
-  "Check text at point for a callback function.
-If the text at point has a `earcon-callback' property,
-call it with the value of the `earcon-data' text property."
-  (interactive)
-  (let* ((data (get-text-property (point) 'earcon-data))
-        (fun (get-text-property (point) 'earcon-callback)))
-    (if fun (funcall fun data))))
-
-(defun earcon-article-prev-button (n)
-  "Move point to N buttons backward.
-If N is negative, move forward instead."
-  (interactive "p")
-  (earcon-article-next-button (- n)))
-
-(defun earcon-article-next-button (n)
-  "Move point to N buttons forward.
-If N is negative, move backward instead."
-  (interactive "p")
-  (let ((function (if (< n 0) 'previous-single-property-change
-                   'next-single-property-change))
-       (inhibit-point-motion-hooks t)
-       (backward (< n 0))
-       (limit (if (< n 0) (point-min) (point-max))))
-    (setq n (abs n))
-    (while (and (not (= limit (point)))
-               (> n 0))
-      ;; Skip past the current button.
-      (when (get-text-property (point) 'earcon-callback)
-       (goto-char (funcall function (point) 'earcon-callback nil limit)))
-      ;; Go to the next (or previous) button.
-      (gnus-goto-char (funcall function (point) 'earcon-callback nil limit))
-      ;; Put point at the start of the button.
-      (when (and backward (not (get-text-property (point) 'earcon-callback)))
-       (goto-char (funcall function (point) 'earcon-callback nil limit)))
-      ;; Skip past intangible buttons.
-      (when (get-text-property (point) 'intangible)
-       (incf n))
-      (decf n))
-    (unless (zerop n)
-      (gnus-message 5 "No more buttons"))
-    n))
-
-(defun earcon-article-add-button (from to fun &optional data)
-  "Create a button between FROM and TO with callback FUN and data DATA."
-  (and (boundp gnus-article-button-face)
-       gnus-article-button-face
-       (gnus-overlay-put (gnus-make-overlay from to)
-                        'face gnus-article-button-face))
-  (gnus-add-text-properties
-   from to
-   (nconc (and gnus-article-mouse-face
-              (list gnus-mouse-face-prop gnus-article-mouse-face))
-         (list 'gnus-callback fun)
-         (and data (list 'gnus-data data)))))
-
-(defun earcon-button-entry ()
-  ;; Return the first entry in `gnus-button-alist' matching this place.
-  (let ((alist earcon-regexp-alist)
-       (case-fold-search t)
-       (entry nil))
-    (while alist
-      (setq entry (pop alist))
-      (if (looking-at (car entry))
-         (setq alist nil)
-       (setq entry nil)))
-    entry))
-
-(defun earcon-button-push (marker)
-  ;; Push button starting at MARKER.
-  (with-current-buffer gnus-article-buffer
-    (goto-char marker)
-    (let* ((entry (earcon-button-entry))
-          (inhibit-point-motion-hooks t)
-          (fun 'gnus-audio-play)
-          (args (list (nth 2 entry))))
-      (cond
-       ((fboundp fun)
-       (apply fun args))
-       ((and (boundp fun)
-            (fboundp (symbol-value fun)))
-       (apply (symbol-value fun) args))
-       (t
-       (gnus-message 1 "You must define `%S' to use this button"
-                     (cons fun args)))))))
-
-;;; FIXME!! clone of code from gnus-vis.el FIXME!!
-
-;;;###interactive
-(defun earcon-region (beg end)
-  "Play Sounds in the region between point and mark."
-  (interactive "r")
-  (earcon-buffer (current-buffer) beg end))
-
-;;;###interactive
-(defun earcon-buffer (&optional buffer st nd)
-  (interactive)
-  (save-excursion
-    ;; clear old markers.
-    (if (boundp 'earcon-button-marker-list)
-       (while earcon-button-marker-list
-         (set-marker (pop earcon-button-marker-list) nil))
-      (setq earcon-button-marker-list nil))
-    (and buffer (set-buffer buffer))
-    (let ((buffer-read-only nil)
-         (inhibit-point-motion-hooks t)
-         (case-fold-search t)
-         (alist earcon-regexp-alist)
-         beg entry regexp)
-      (goto-char (point-min))
-      (setq beg (point))
-      (while (setq entry (pop alist))
-       (setq regexp (concat (regexp-quote earcon-prefix)
-                            ".*\\("
-                            (car entry)
-                            "\\).*"
-                            (regexp-quote earcon-suffix)))
-       (goto-char beg)
-       (while (re-search-forward regexp nil t)
-         (let* ((start (and entry (match-beginning 1)))
-                (end (and entry (match-end 1)))
-                (from (match-beginning 1)))
-           (earcon-article-add-button
-            start end 'earcon-button-push
-            (car (push (set-marker (make-marker) from)
-                       earcon-button-marker-list)))
-           (gnus-audio-play (caddr entry))))))))
-
-;;;###autoload
-(defun gnus-earcon-display ()
-  "Play sounds in message buffers."
-  (interactive)
-  (with-current-buffer gnus-article-buffer
-    (goto-char (point-min))
-    ;; Skip headers
-    (unless (search-forward "\n\n" nil t)
-      (goto-char (point-max)))
-    (sit-for 0)
-    (earcon-buffer (current-buffer) (point))))
-
-;;;***
-
-(provide 'earcon)
-
-(run-hooks 'earcon-load-hook)
-
-;;; earcon.el ends here
index ace52b6..8a0f0a3 100644 (file)
@@ -1614,15 +1614,6 @@ predicate.  See Info node `(gnus)Customizing Articles'."
   :link '(custom-manual "(gnus)Customizing Articles")
   :type gnus-article-treat-custom)
 
-(defcustom gnus-treat-play-sounds nil
-  "Play sounds.
-Valid values are nil, t, `head', `first', `last', an integer or a
-predicate.  See Info node `(gnus)Customizing Articles'."
-  :version "21.1"
-  :group 'gnus-article-treat
-  :link '(custom-manual "(gnus)Customizing Articles")
-  :type gnus-article-treat-custom)
-
 (defcustom gnus-treat-x-pgp-sig nil
   "Verify X-PGP-Sig.
 To automatically treat X-PGP-Sig, set it to head.
@@ -1727,8 +1718,7 @@ This requires GNU Libidn, and by default only enabled if it is found."
     (gnus-treat-hide-citation gnus-article-hide-citation)
     (gnus-treat-hide-citation-maybe gnus-article-hide-citation-maybe)
     (gnus-treat-highlight-citation gnus-article-highlight-citation)
-    (gnus-treat-body-boundary gnus-article-treat-body-boundary)
-    (gnus-treat-play-sounds gnus-earcon-display)))
+    (gnus-treat-body-boundary gnus-article-treat-body-boundary)))
 
 (defvar gnus-article-mime-handle-alist nil)
 (defvar article-lapsed-timer nil)
diff --git a/lisp/gnus-audio.el b/lisp/gnus-audio.el
deleted file mode 100644 (file)
index cc19817..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-;;; gnus-audio.el --- Sound effects for Gnus
-
-;; Copyright (C) 1996, 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
-
-;; Author: Steven L. Baur <steve@miranova.com>
-;; Keywords: news, mail, multimedia
-
-;; This file is part of GNU Emacs.
-
-;; GNU Emacs is free software: you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; GNU Emacs is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
-
-;;; Commentary:
-
-;; This file provides access to sound effects in Gnus.
-;; This file is partially stripped to support earcons.el.
-
-;;; Code:
-
-(require 'nnheader)
-
-(defgroup gnus-audio nil
-  "Playing sound in Gnus."
-  :version "21.1"
-  :group 'gnus-visual
-  :group 'multimedia)
-
-(defvar gnus-audio-inline-sound
-  (or (if (fboundp 'device-sound-enabled-p)
-         (device-sound-enabled-p))     ; XEmacs
-      (fboundp 'play-sound))           ; Emacs
-  "Non-nil means try to play sounds without using an external program.")
-
-(defcustom gnus-audio-directory (nnheader-find-etc-directory "sounds")
-  "The directory containing the Sound Files."
-  :type '(choice directory (const nil))
-  :group 'gnus-audio)
-
-(defcustom gnus-audio-au-player (executable-find "play")
-  "Executable program for playing sun AU format sound files."
-  :group 'gnus-audio
-  :type '(choice file (const nil)))
-
-(defcustom gnus-audio-wav-player (executable-find "play")
-  "Executable program for playing WAV files."
-  :group 'gnus-audio
-  :type '(choice file (const nil)))
-
-;;; 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
-;;  "Functions run when enabling sound effects.")
-;;(defvar gnus-audio-disable-hooks nil
-;;  "Functions run when disabling sound effects.")
-;;(defvar gnus-audio-theme-song nil
-;;  "Theme song for Gnus.")
-;;(defvar gnus-audio-enter-group nil
-;;  "Sound effect played when selecting a group.")
-;;(defvar gnus-audio-exit-group nil
-;;  "Sound effect played when exiting a group.")
-;;(defvar gnus-audio-score-group nil
-;;  "Sound effect played when scoring a group.")
-;;(defvar gnus-audio-busy-sound nil
-;;  "Sound effect played when going into a ... sequence.")
-
-
-;;;###autoload
-;;(defun gnus-audio-enable-sound ()
-;;  "Enable Sound Effects for Gnus."
-;;  (interactive)
-;;  (setq gnus-audio-effects-enabled t)
-;;  (gnus-run-hooks gnus-audio-enable-hooks))
-
-;;;###autoload
-                                       ;(defun gnus-audio-disable-sound ()
-;;  "Disable Sound Effects for Gnus."
-;;  (interactive)
-;;  (setq gnus-audio-effects-enabled nil)
-;;  (gnus-run-hooks gnus-audio-disable-hooks))
-
-;;;###autoload
-(defun gnus-audio-play (file)
-  "Play a sound FILE through the speaker."
-  (interactive "fSound file name: ")
-  (let ((sound-file (if (file-exists-p file)
-                       file
-                     (expand-file-name file gnus-audio-directory))))
-    (when (file-exists-p sound-file)
-      (cond ((and gnus-audio-inline-sound
-                (condition-case nil
-                    ;; Even if we have audio, we may fail with the
-                    ;; wrong sort of sound file.
-                    (progn (play-sound-file sound-file)
-                           t)
-                  (error nil))))
-           ;; If we don't have built-in sound, or playing it failed,
-           ;; try with external program.
-           ((equal "wav" (file-name-extension sound-file))
-            (call-process gnus-audio-wav-player
-                          sound-file
-                          0
-                          nil
-                          sound-file))
-           ((equal "au" (file-name-extension sound-file))
-            (call-process gnus-audio-au-player
-                          sound-file
-                          0
-                          nil
-                          sound-file))))))
-
-
-;;; The following isn't implemented yet, wait for Red Gnus
-;;(defun gnus-audio-startrek-sounds ()
-;;  "Enable sounds from Star Trek the original series."
-;;  (interactive)
-;;  (setq gnus-audio-busy-sound "working.au")
-;;  (setq gnus-audio-enter-group "bulkhead_door.au")
-;;  (setq gnus-audio-exit-group "bulkhead_door.au")
-;;  (setq gnus-audio-score-group "ST_laser.au")
-;;  (setq gnus-audio-theme-song "startrek.au")
-;;  (add-hook 'gnus-select-group-hook 'gnus-audio-startrek-select-group)
-;;  (add-hook 'gnus-exit-group-hook 'gnus-audio-startrek-exit-group))
-;;;***
-
-(defvar gnus-startup-jingle "Tuxedomoon.Jingle4.au"
-  "Name of the Gnus startup jingle file.")
-
-(defun gnus-play-jingle ()
-  "Play the Gnus startup jingle, unless that's inhibited."
-  (interactive)
-  (gnus-audio-play gnus-startup-jingle))
-
-(provide 'gnus-audio)
-
-(run-hooks 'gnus-audio-load-hook)
-
-;;; gnus-audio.el ends here
index 838150d..6da91bd 100644 (file)
@@ -865,11 +865,6 @@ This can be changed using the `\\[gnus-score-change-score-file]' command."
 Check the [ ] for the entries you want to apply to this score file, then
 edit the value to suit your taste.  Don't forget to mark the checkbox,
 if you do all your changes will be lost.  ")
-    (widget-create 'push-button
-                  :action (lambda (&rest ignore)
-                            (require 'gnus-audio)
-                            (gnus-audio-play "Evil_Laugh.au"))
-                  "Bhahahah!")
     (widget-insert "\n\n")
     (make-local-variable 'gnus-custom-scores)
     (setq gnus-custom-scores
index b94e97c..9ab59d5 100644 (file)
@@ -307,11 +307,6 @@ be set in `.emacs' instead."
   :group 'gnus-start
   :type 'boolean)
 
-(defcustom gnus-play-startup-jingle nil
-  "If non-nil, play the Gnus jingle at startup."
-  :group 'gnus-start
-  :type 'boolean)
-
 (unless (fboundp 'gnus-group-remove-excess-properties)
   (defalias 'gnus-group-remove-excess-properties 'ignore))
 
@@ -959,8 +954,6 @@ be set in `.emacs' instead."
 
 (defvar gnus-group-buffer "*Group*")
 
-(autoload 'gnus-play-jingle "gnus-audio")
-
 (defface gnus-splash
   '((((class color)
       (background dark))
@@ -983,9 +976,7 @@ be set in `.emacs' instead."
       (erase-buffer)
       (unless gnus-inhibit-startup-message
        (gnus-group-startup-message)
-       (sit-for 0)
-       (when gnus-play-startup-jingle
-         (gnus-play-jingle))))))
+       (sit-for 0)))))
 
 (defun gnus-indent-rigidly (start end arg)
   "Indent rigidly using only spaces and no tabs."
@@ -2793,7 +2784,6 @@ gnus-registry.el will populate this if it's loaded.")
       rmail-summary-exists rmail-select-summary)
      ;; Only used in gnus-util, which has an autoload.
      ("rmailsum" rmail-update-summary)
-     ("gnus-audio" :interactive t gnus-audio-play)
      ("gnus-xmas" gnus-xmas-splash)
      ("score-mode" :interactive t gnus-score-mode)
      ("gnus-mh" gnus-summary-save-article-folder
index d5a8674..6dcc195 100644 (file)
@@ -1,6 +1,7 @@
 2010-09-26  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * gnus.texi (NoCeM): Removed.
+       (Startup Variables): No jingle.
 
 2010-09-25  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
index 1b61b51..33220c2 100644 (file)
@@ -336,7 +336,7 @@ be unchanged except that the marks will be removed when copying or
 moving articles to a group that has not turned auto-expire on.
 @xref{Expiring Mail}.
 
-@itemize @bullet NoCeM support has been removed.
+@item NoCeM support has been removed.
 
 @end itemize
 
index 7ed9759..2acaf55 100644 (file)
@@ -1627,15 +1627,6 @@ of doing your job.  Note that this variable is used before
 @vindex gnus-no-groups-message
 Message displayed by Gnus when no groups are available.
 
-@item gnus-play-startup-jingle
-@vindex gnus-play-startup-jingle
-If non-@code{nil}, play the Gnus jingle at startup.
-
-@item gnus-startup-jingle
-@vindex gnus-startup-jingle
-Jingle to be played if the above variable is non-@code{nil}.  The
-default is @samp{Tuxedomoon.Jingle4.au}.
-
 @item gnus-use-backend-marks
 @vindex gnus-use-backend-marks
 If non-@code{nil}, Gnus will store article marks both in the