diff options
| author | Stefan Monnier | 2017-11-20 13:05:28 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2017-11-20 13:05:28 -0500 |
| commit | 7da1e9cd186723846b49bd7ba5ba87efb44c4ec1 (patch) | |
| tree | 05b22a2d3e0e16ffd3eb3e04e1e70e5c4d5b15ec | |
| parent | 51a5ccbe850da9fa5b58cee169fd5dbe8917f4e7 (diff) | |
| download | emacs-7da1e9cd186723846b49bd7ba5ba87efb44c4ec1.tar.gz emacs-7da1e9cd186723846b49bd7ba5ba87efb44c4ec1.zip | |
* lisp/erc/erc-services.el: Use lexical-binding
| -rw-r--r-- | lisp/erc/erc-services.el | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/lisp/erc/erc-services.el b/lisp/erc/erc-services.el index 348a592a888..6d0e7c85a96 100644 --- a/lisp/erc/erc-services.el +++ b/lisp/erc/erc-services.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; erc-services.el --- Identify to NickServ | 1 | ;;; erc-services.el --- Identify to NickServ -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2002-2004, 2006-2017 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2002-2004, 2006-2017 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -89,7 +89,7 @@ Possible settings are:. | |||
| 89 | latter. | 89 | latter. |
| 90 | nil - Disables automatic Nickserv identification. | 90 | nil - Disables automatic Nickserv identification. |
| 91 | 91 | ||
| 92 | You can also use M-x erc-nickserv-identify-mode to change modes." | 92 | You can also use \\[erc-nickserv-identify-mode] to change modes." |
| 93 | :group 'erc-services | 93 | :group 'erc-services |
| 94 | :type '(choice (const autodetect) | 94 | :type '(choice (const autodetect) |
| 95 | (const nick-change) | 95 | (const nick-change) |
| @@ -348,7 +348,7 @@ Hooks are called with arguments (NETWORK NICK)." | |||
| 348 | :group 'erc-services | 348 | :group 'erc-services |
| 349 | :type 'hook) | 349 | :type 'hook) |
| 350 | 350 | ||
| 351 | (defun erc-nickserv-identification-autodetect (proc parsed) | 351 | (defun erc-nickserv-identification-autodetect (_proc parsed) |
| 352 | "Check for NickServ's successful identification notice. | 352 | "Check for NickServ's successful identification notice. |
| 353 | Make sure it is the real NickServ for this network and that it has | 353 | Make sure it is the real NickServ for this network and that it has |
| 354 | specifically confirmed a successful identification attempt. | 354 | specifically confirmed a successful identification attempt. |
| @@ -368,7 +368,7 @@ If this is the case, run `erc-nickserv-identified-hook'." | |||
| 368 | (run-hook-with-args 'erc-nickserv-identified-hook network nick) | 368 | (run-hook-with-args 'erc-nickserv-identified-hook network nick) |
| 369 | nil))) | 369 | nil))) |
| 370 | 370 | ||
| 371 | (defun erc-nickserv-identify-autodetect (proc parsed) | 371 | (defun erc-nickserv-identify-autodetect (_proc parsed) |
| 372 | "Identify to NickServ when an identify request is received. | 372 | "Identify to NickServ when an identify request is received. |
| 373 | Make sure it is the real NickServ for this network. | 373 | Make sure it is the real NickServ for this network. |
| 374 | If `erc-prompt-for-nickserv-password' is non-nil, prompt the user for the | 374 | If `erc-prompt-for-nickserv-password' is non-nil, prompt the user for the |
| @@ -390,7 +390,7 @@ password for this nickname, otherwise try to send it automatically." | |||
| 390 | (erc-nickserv-call-identify-function nick) | 390 | (erc-nickserv-call-identify-function nick) |
| 391 | nil)))) | 391 | nil)))) |
| 392 | 392 | ||
| 393 | (defun erc-nickserv-identify-on-connect (server nick) | 393 | (defun erc-nickserv-identify-on-connect (_server nick) |
| 394 | "Identify to Nickserv after the connection to the server is established." | 394 | "Identify to Nickserv after the connection to the server is established." |
| 395 | (unless (or (and (null erc-nickserv-passwords) | 395 | (unless (or (and (null erc-nickserv-passwords) |
| 396 | (null erc-prompt-for-nickserv-password)) | 396 | (null erc-prompt-for-nickserv-password)) |
| @@ -398,7 +398,7 @@ password for this nickname, otherwise try to send it automatically." | |||
| 398 | (erc-nickserv-alist-regexp (erc-network)))) | 398 | (erc-nickserv-alist-regexp (erc-network)))) |
| 399 | (erc-nickserv-call-identify-function nick))) | 399 | (erc-nickserv-call-identify-function nick))) |
| 400 | 400 | ||
| 401 | (defun erc-nickserv-identify-on-nick-change (nick old-nick) | 401 | (defun erc-nickserv-identify-on-nick-change (nick _old-nick) |
| 402 | "Identify to Nickserv whenever your nick changes." | 402 | "Identify to Nickserv whenever your nick changes." |
| 403 | (unless (or (and (null erc-nickserv-passwords) | 403 | (unless (or (and (null erc-nickserv-passwords) |
| 404 | (null erc-prompt-for-nickserv-password)) | 404 | (null erc-prompt-for-nickserv-password)) |
| @@ -407,9 +407,9 @@ password for this nickname, otherwise try to send it automatically." | |||
| 407 | (erc-nickserv-call-identify-function nick))) | 407 | (erc-nickserv-call-identify-function nick))) |
| 408 | 408 | ||
| 409 | (defun erc-nickserv-call-identify-function (nickname) | 409 | (defun erc-nickserv-call-identify-function (nickname) |
| 410 | "Call `erc-nickserv-identify' interactively or run it with NICKNAME's | 410 | "Call `erc-nickserv-identify'. |
| 411 | password. | 411 | Either call it interactively or run it with NICKNAME's password, |
| 412 | The action is determined by the value of `erc-prompt-for-nickserv-password'." | 412 | depending on the value of `erc-prompt-for-nickserv-password'." |
| 413 | (if erc-prompt-for-nickserv-password | 413 | (if erc-prompt-for-nickserv-password |
| 414 | (call-interactively 'erc-nickserv-identify) | 414 | (call-interactively 'erc-nickserv-identify) |
| 415 | (when erc-nickserv-passwords | 415 | (when erc-nickserv-passwords |
| @@ -418,6 +418,8 @@ The action is determined by the value of `erc-prompt-for-nickserv-password'." | |||
| 418 | (nth 1 (assoc (erc-network) | 418 | (nth 1 (assoc (erc-network) |
| 419 | erc-nickserv-passwords)))))))) | 419 | erc-nickserv-passwords)))))))) |
| 420 | 420 | ||
| 421 | (defvar erc-auto-discard-away) | ||
| 422 | |||
| 421 | ;;;###autoload | 423 | ;;;###autoload |
| 422 | (defun erc-nickserv-identify (password) | 424 | (defun erc-nickserv-identify (password) |
| 423 | "Send an \"identify <PASSWORD>\" message to NickServ. | 425 | "Send an \"identify <PASSWORD>\" message to NickServ. |