diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2021-03-18 23:14:33 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2021-03-18 23:14:33 -0400 |
commit | f463633f007a92418f1ea7d46347824d51373aa3 (patch) | |
tree | ea1edcc4443a6f2e4fe722eac9704ce2a1112831 /lisp/erc/erc-speedbar.el | |
parent | 050b830b698dfe62737428d35fec80f561692b07 (diff) | |
download | emacs-f463633f007a92418f1ea7d46347824d51373aa3.tar.gz |
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.
Diffstat (limited to 'lisp/erc/erc-speedbar.el')
-rw-r--r-- | lisp/erc/erc-speedbar.el | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/lisp/erc/erc-speedbar.el b/lisp/erc/erc-speedbar.el index c2be23990f1..bb858445235 100644 --- a/lisp/erc/erc-speedbar.el +++ b/lisp/erc/erc-speedbar.el @@ -1,4 +1,4 @@ -;;; erc-speedbar.el --- Speedbar support for ERC +;;; erc-speedbar.el --- Speedbar support for ERC -*- lexical-binding: t; -*- ;; Copyright (C) 2001-2004, 2006-2021 Free Software Foundation, Inc. @@ -52,7 +52,6 @@ `activity' - Sort users by channel activity `alphabetical' - Sort users alphabetically nil - Do not sort users" - :group 'erc-speedbar :type '(choice (const :tag "Sort users by channel activity" activity) (const :tag "Sort users alphabetically" alphabetical) (const :tag "Do not sort users" nil))) @@ -67,11 +66,11 @@ nil - Do not sort users" (setq erc-speedbar-key-map (speedbar-make-specialized-keymap)) ;; Basic tree features - (define-key erc-speedbar-key-map "e" 'speedbar-edit-line) - (define-key erc-speedbar-key-map "\C-m" 'speedbar-edit-line) - (define-key erc-speedbar-key-map "+" 'speedbar-expand-line) - (define-key erc-speedbar-key-map "=" 'speedbar-expand-line) - (define-key erc-speedbar-key-map "-" 'speedbar-contract-line)) + (define-key erc-speedbar-key-map "e" #'speedbar-edit-line) + (define-key erc-speedbar-key-map "\C-m" #'speedbar-edit-line) + (define-key erc-speedbar-key-map "+" #'speedbar-expand-line) + (define-key erc-speedbar-key-map "=" #'speedbar-expand-line) + (define-key erc-speedbar-key-map "-" #'speedbar-contract-line)) (speedbar-add-expansion-list '("ERC" erc-speedbar-menu-items erc-speedbar-key-map @@ -124,7 +123,7 @@ This will add a speedbar major display mode." (erc-speedbar-insert-target buffer 0)) (t (ignore))))) -(defun erc-speedbar-server-buttons (directory depth) +(defun erc-speedbar-server-buttons (_directory depth) "Insert the initial list of servers you are connected to." (let ((servers (erc-buffer-list (lambda () @@ -154,7 +153,7 @@ This will add a speedbar major display mode." (t (error "Ooops... not sure what to do"))) (speedbar-center-buffer-smartly)) -(defun erc-speedbar-channel-buttons (directory depth server-buffer) +(defun erc-speedbar-channel-buttons (_directory depth server-buffer) (when (get-buffer server-buffer) (let* ((proc (with-current-buffer server-buffer erc-server-process)) (targets (erc-buffer-list @@ -191,7 +190,7 @@ INDENT is the current indentation level." (save-excursion (end-of-line) (forward-char 1) (let ((modes (with-current-buffer channel - (concat (apply 'concat + (concat (apply #'concat erc-channel-modes) (cond ((and erc-channel-user-limit @@ -314,7 +313,7 @@ The update is only done when the channel is actually expanded already." (t (error "Ooops... not sure what to do"))) (speedbar-center-buffer-smartly)) -(defun erc-speedbar-goto-buffer (text buffer indent) +(defun erc-speedbar-goto-buffer (_text buffer _indent) "When user clicks on TEXT, goto an ERC buffer. The INDENT level is ignored." (if (featurep 'dframe) |