summaryrefslogtreecommitdiff
path: root/lisp/erc/erc-sound.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/erc/erc-sound.el')
-rw-r--r--lisp/erc/erc-sound.el15
1 files changed, 6 insertions, 9 deletions
diff --git a/lisp/erc/erc-sound.el b/lisp/erc/erc-sound.el
index edde9737ff9..92759d206a3 100644
--- a/lisp/erc/erc-sound.el
+++ b/lisp/erc/erc-sound.el
@@ -1,4 +1,4 @@
-;;; erc-sound.el --- CTCP SOUND support for ERC
+;;; erc-sound.el --- CTCP SOUND support for ERC -*- lexical-binding: t -*-
;; Copyright (C) 2002-2003, 2006-2021 Free Software Foundation, Inc.
@@ -52,11 +52,11 @@
"In ERC sound mode, the client will respond to CTCP SOUND requests
and play sound files as requested."
;; Enable:
- ((add-hook 'erc-ctcp-query-SOUND-hook 'erc-ctcp-query-SOUND)
- (define-key erc-mode-map "\C-c\C-s" 'erc-toggle-sound))
+ ((add-hook 'erc-ctcp-query-SOUND-hook #'erc-ctcp-query-SOUND)
+ (define-key erc-mode-map "\C-c\C-s" #'erc-toggle-sound))
;; Disable:
- ((remove-hook 'erc-ctcp-query-SOUND-hook 'erc-ctcp-query-SOUND)
- (define-key erc-mode-map "\C-c\C-s" 'undefined)))
+ ((remove-hook 'erc-ctcp-query-SOUND-hook #'erc-ctcp-query-SOUND)
+ (define-key erc-mode-map "\C-c\C-s" #'undefined)))
(erc-define-catalog-entry 'english 'CTCP-SOUND "%n (%u@%h) plays %s:%m")
@@ -66,18 +66,15 @@ and play sound files as requested."
(defcustom erc-play-sound t
"Play sounds when you receive CTCP SOUND requests."
- :group 'erc-sound
:type 'boolean)
(defcustom erc-sound-path nil
"List of directories that contain sound samples to play on SOUND events."
- :group 'erc-sound
:type '(repeat directory))
(defcustom erc-default-sound nil
"Play this sound if the requested file was not found.
If this is set to nil or the file doesn't exist a beep will sound."
- :group 'erc-sound
:type '(choice (const nil)
file))
@@ -108,7 +105,7 @@ LINE is the text entered, including the command."
t))
(t nil)))
-(defun erc-ctcp-query-SOUND (proc nick login host to msg)
+(defun erc-ctcp-query-SOUND (_proc nick login host _to msg)
"Display a CTCP SOUND message and play sound if `erc-play-sound' is non-nil."
(when (string-match "^SOUND\\s-+\\(\\S-+\\)\\(\\(\\s-+.*\\)\\|\\(\\s-*\\)\\)$" msg)
(let ((sound (match-string 1 msg))