diff options
| author | Stefan Kangas | 2021-02-11 21:30:23 +0100 |
|---|---|---|
| committer | Stefan Kangas | 2021-02-11 21:41:58 +0100 |
| commit | 4f63b4bfc6c16abeaf9d8a9e9de76cc42d772567 (patch) | |
| tree | ee3dfe9f024408979e46b74d78655a517110f29d | |
| parent | 0bcec1e4ae0028d6f0f4c04ab2717f6fdadb79c1 (diff) | |
| download | emacs-4f63b4bfc6c16abeaf9d8a9e9de76cc42d772567.tar.gz emacs-4f63b4bfc6c16abeaf9d8a9e9de76cc42d772567.zip | |
Use lexical-binding in erc-sound.el
* lisp/erc/erc-sound.el: Use lexical-binding. Remove redundant :group
args.
| -rw-r--r-- | lisp/erc/erc-sound.el | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lisp/erc/erc-sound.el b/lisp/erc/erc-sound.el index edde9737ff9..fff1639a9de 100644 --- a/lisp/erc/erc-sound.el +++ b/lisp/erc/erc-sound.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; erc-sound.el --- CTCP SOUND support for ERC | 1 | ;;; erc-sound.el --- CTCP SOUND support for ERC -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2002-2003, 2006-2021 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2002-2003, 2006-2021 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -66,18 +66,15 @@ and play sound files as requested." | |||
| 66 | 66 | ||
| 67 | (defcustom erc-play-sound t | 67 | (defcustom erc-play-sound t |
| 68 | "Play sounds when you receive CTCP SOUND requests." | 68 | "Play sounds when you receive CTCP SOUND requests." |
| 69 | :group 'erc-sound | ||
| 70 | :type 'boolean) | 69 | :type 'boolean) |
| 71 | 70 | ||
| 72 | (defcustom erc-sound-path nil | 71 | (defcustom erc-sound-path nil |
| 73 | "List of directories that contain sound samples to play on SOUND events." | 72 | "List of directories that contain sound samples to play on SOUND events." |
| 74 | :group 'erc-sound | ||
| 75 | :type '(repeat directory)) | 73 | :type '(repeat directory)) |
| 76 | 74 | ||
| 77 | (defcustom erc-default-sound nil | 75 | (defcustom erc-default-sound nil |
| 78 | "Play this sound if the requested file was not found. | 76 | "Play this sound if the requested file was not found. |
| 79 | If this is set to nil or the file doesn't exist a beep will sound." | 77 | If this is set to nil or the file doesn't exist a beep will sound." |
| 80 | :group 'erc-sound | ||
| 81 | :type '(choice (const nil) | 78 | :type '(choice (const nil) |
| 82 | file)) | 79 | file)) |
| 83 | 80 | ||
| @@ -108,7 +105,7 @@ LINE is the text entered, including the command." | |||
| 108 | t)) | 105 | t)) |
| 109 | (t nil))) | 106 | (t nil))) |
| 110 | 107 | ||
| 111 | (defun erc-ctcp-query-SOUND (proc nick login host to msg) | 108 | (defun erc-ctcp-query-SOUND (_proc nick login host _to msg) |
| 112 | "Display a CTCP SOUND message and play sound if `erc-play-sound' is non-nil." | 109 | "Display a CTCP SOUND message and play sound if `erc-play-sound' is non-nil." |
| 113 | (when (string-match "^SOUND\\s-+\\(\\S-+\\)\\(\\(\\s-+.*\\)\\|\\(\\s-*\\)\\)$" msg) | 110 | (when (string-match "^SOUND\\s-+\\(\\S-+\\)\\(\\(\\s-+.*\\)\\|\\(\\s-*\\)\\)$" msg) |
| 114 | (let ((sound (match-string 1 msg)) | 111 | (let ((sound (match-string 1 msg)) |