*** empty log message ***
[gnus] / lisp / earcon.el
index 2147eca..4302182 100644 (file)
@@ -2,10 +2,6 @@
 ;; Copyright (C) 1996 Free Software Foundation
 
 ;; Author: Steven L. Baur <steve@miranova.com>
-;; Keywords: news fun sound
-
-;; 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 2, or (at your option)
 (if (null (boundp 'running-xemacs))
     (defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version)))
 
+(eval-when-compile (require 'cl))
 (require 'gnus)
 (require 'gnus-audio)
 (require 'gnus-art)
-(eval-when-compile (require 'cl))
 
-(defvar earcon-auto-play nil
-  "When True, automatically play sounds as well as buttonize them.")
+(defgroup earcon nil
+  "Turn ** sounds ** into noise."
+  :group 'gnus-visual)
+
+(defcustom earcon-auto-play nil
+  "*When True, automatically play sounds as well as buttonize them."
+  :type 'boolean
+  :group 'earcon)
 
-(defvar earcon-prefix "**"
-  "The start of an earcon")
+(defcustom earcon-prefix "**"
+  "*String denoting the start of an earcon."
+  :type 'string
+  :group 'earcon)
 
-(defvar earcon-suffix "**"
-  "The end of an earcon")
+(defcustom earcon-suffix "**"
+  "String denoting the end of an earcon."
+  :type 'string
+  :group 'earcon)
 
-(defvar earcon-regexp-alist
+(defcustom earcon-regexp-alist
   '(("boring" 1 "Boring.au")
     ("evil[ \t]+laugh" 1 "Evil_Laugh.au")
     ("gag\\|puke" 1 "Puke.au")
     ("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.")
-
+  "*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)
 
@@ -128,7 +137,7 @@ If N is negative, move backward instead."
        gnus-article-button-face
        (gnus-overlay-put (gnus-make-overlay from to)
                         'face gnus-article-button-face))
-  (gnus-add-text-properties 
+  (gnus-add-text-properties
    from to
    (nconc (and gnus-article-mouse-face
               (list gnus-mouse-face-prop gnus-article-mouse-face))