mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
lisp/erc: Use lexical-binding
Also remove various redundant `:group` arguments. * lisp/erc/erc-backend.el (define-erc-response-handler): Move `declare` after the docstring. * lisp/erc/erc-capab.el: Use lexical-binding. (erc-capab-identify-activate): Simplify with `member`. * lisp/erc/erc-dcc.el (erc-dcc): Move before erc-dcc-mode definition, which refers to it. (erc-dcc-chat-accept): Remove unused vars `nick` and `buffer`. * lisp/erc/erc-imenu.el: Use lexical-binding. (erc-create-imenu-index): Remove unused var `prev-pos`. * lisp/erc/erc-match.el: Use lexical-binding. (erc-match-message): Remove unused var `old-pt`. (erc-match-message): Strength-reduce `eval` to `symbol-value`. * lisp/erc/erc-page.el: Use lexical-binding. (erc-page): Move Custom group before `erg-page-mode` which refers to it. * lisp/erc/erc-replace.el: Use lexical-binding. (erc-replace-insert): Use `functionp`. * lisp/erc/erc-status-sidebar.el: Use lexical-binding. (erc-status-sidebar-open): Remove unused var `sidebar-window`. * lisp/erc/erc.el: Fix header to use the customary 3 semi-colons. (erc-fill-column): Declare variable. * lisp/erc/erc-autoaway.el: Use lexical-binding. * lisp/erc/erc-ezbounce.el: Use lexical-binding. * lisp/erc/erc-fill.el: Use lexical-binding. * lisp/erc/erc-goodies.el: Use lexical-binding. * lisp/erc/erc-ibuffer.el: Use lexical-binding. * lisp/erc/erc-identd.el: Use lexical-binding. * lisp/erc/erc-join.el: Use lexical-binding. * lisp/erc/erc-lang.el: Use lexical-binding. * lisp/erc/erc-log.el: Use lexical-binding. * lisp/erc/erc-menu.el: Use lexical-binding. * lisp/erc/erc-netsplit.el: Use lexical-binding. * lisp/erc/erc-networks.el: Use lexical-binding. * lisp/erc/erc-pcomplete.el: Use lexical-binding. * lisp/erc/erc-ring.el: Use lexical-binding. * lisp/erc/erc-speedbar.el: Use lexical-binding. * lisp/erc/erc-spelling.el: Use lexical-binding. * lisp/erc/erc-truncate.el: Use lexical-binding. * lisp/erc/erc-xdcc.el: Use lexical-binding.
This commit is contained in:
parent
050b830b69
commit
f463633f00
35 changed files with 430 additions and 584 deletions
|
|
@ -1,4 +1,4 @@
|
|||
;;; erc-ezbounce.el --- Handle EZBounce bouncer commands
|
||||
;;; erc-ezbounce.el --- Handle EZBounce bouncer commands -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2002, 2004, 2006-2021 Free Software Foundation, Inc.
|
||||
|
||||
|
|
@ -33,7 +33,6 @@
|
|||
|
||||
(defcustom erc-ezb-regexp "^ezbounce!srv$"
|
||||
"Regexp used by the EZBouncer to identify itself to the user."
|
||||
:group 'erc-ezbounce
|
||||
:type 'regexp)
|
||||
|
||||
(defcustom erc-ezb-login-alist '()
|
||||
|
|
@ -44,7 +43,6 @@ The alist's format is as follows:
|
|||
(((server . port) . (username . password))
|
||||
((server . port) . (username . password))
|
||||
...)"
|
||||
:group 'erc-ezbounce
|
||||
:type '(repeat
|
||||
(cons (cons :tag "Server"
|
||||
string
|
||||
|
|
@ -68,7 +66,7 @@ The alist's format is as follows:
|
|||
"Indicate whether current notices are expected to be EZB session listings.")
|
||||
|
||||
;;;###autoload
|
||||
(defun erc-cmd-ezb (line &optional force)
|
||||
(defun erc-cmd-ezb (line &optional _force)
|
||||
"Send EZB commands to the EZBouncer verbatim."
|
||||
(erc-server-send (concat "EZB " line)))
|
||||
(put 'erc-cmd-EZB 'do-not-parse-args t)
|
||||
|
|
@ -102,7 +100,7 @@ in the alist is nil, prompt for the appropriate values."
|
|||
found))
|
||||
|
||||
;;;###autoload
|
||||
(defun erc-ezb-notice-autodetect (proc parsed)
|
||||
(defun erc-ezb-notice-autodetect (_proc parsed)
|
||||
"React on an EZBounce NOTICE request."
|
||||
(let* ((sender (erc-response.sender parsed))
|
||||
(message (erc-response.contents parsed))
|
||||
|
|
@ -113,7 +111,7 @@ in the alist is nil, prompt for the appropriate values."
|
|||
nil)
|
||||
|
||||
;;;###autoload
|
||||
(defun erc-ezb-identify (message)
|
||||
(defun erc-ezb-identify (_message)
|
||||
"Identify to the EZBouncer server."
|
||||
(let ((login (erc-ezb-get-login erc-session-server (erc-port-to-string erc-session-port))))
|
||||
(unless (null login)
|
||||
|
|
@ -122,13 +120,13 @@ in the alist is nil, prompt for the appropriate values."
|
|||
(erc-server-send (concat "LOGIN " username " " pass))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun erc-ezb-init-session-list (message)
|
||||
(defun erc-ezb-init-session-list (_message)
|
||||
"Reset the EZBounce session list to nil."
|
||||
(setq erc-ezb-session-list nil)
|
||||
(setq erc-ezb-inside-session-listing t))
|
||||
|
||||
;;;###autoload
|
||||
(defun erc-ezb-end-of-session-list (message)
|
||||
(defun erc-ezb-end-of-session-list (_message)
|
||||
"Indicate the end of the EZBounce session listing."
|
||||
(setq erc-ezb-inside-session-listing nil))
|
||||
|
||||
|
|
@ -143,7 +141,7 @@ in the alist is nil, prompt for the appropriate values."
|
|||
(add-to-list 'erc-ezb-session-list (list id nick to)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun erc-ezb-select (message)
|
||||
(defun erc-ezb-select (_message)
|
||||
"Select an IRC server to use by EZBounce, in ERC style."
|
||||
(unless (and erc-ezb-session-list
|
||||
(erc-ezb-select-session))
|
||||
|
|
@ -169,7 +167,7 @@ in the alist is nil, prompt for the appropriate values."
|
|||
;;;###autoload
|
||||
(defun erc-ezb-initialize ()
|
||||
"Add EZBouncer convenience functions to ERC."
|
||||
(add-hook 'erc-server-NOTICE-functions 'erc-ezb-notice-autodetect))
|
||||
(add-hook 'erc-server-NOTICE-functions #'erc-ezb-notice-autodetect))
|
||||
|
||||
(provide 'erc-ezbounce)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue