diff options
| author | Juanma Barranquero | 2006-11-28 01:39:08 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2006-11-28 01:39:08 +0000 |
| commit | a3d2f0a3b87c03ae4605217214b3d1a55ee2021c (patch) | |
| tree | 663d3c07b2753556ee28ca371ceaceef3653caec | |
| parent | 151ccb74000f5dbf2663d88b204b1bdf8e3ebd56 (diff) | |
| download | emacs-a3d2f0a3b87c03ae4605217214b3d1a55ee2021c.tar.gz emacs-a3d2f0a3b87c03ae4605217214b3d1a55ee2021c.zip | |
(erc-cmd-BANLIST, erc-cmd-MASSUNBAN): Simplify.
(erc-prompt-for-channel-key, erc-ignore-reply-list, erc-send-post-hook,
erc-active-buffer, erc-join-buffer, erc-frame-alist, erc-with-buffer,
erc-modules, erc-display-message-highlight, erc-process-input-line,
erc-cmd-HELP, erc-server-hooks, erc-echo-notice-in-user-buffers,
erc-format-my-nick, erc-echo-notice-in-user-and-target-buffers,
erc-echo-notice-in-first-user-buffer, erc-connection-established,
erc-update-user-nick, erc-update-channel-member, erc-highlight-notice,
erc-command-symbol, erc-add-query, erc-process-script-line,
erc-determine-parameters, erc-client-info, erc-popup-input-buffer,
erc-script-echo): Fix typos in docstrings.
(erc-channel-user-op-p, erc-channel-user-voice-p, erc-startup-file-list,
define-erc-module, erc-once-with-server-event,
erc-once-with-server-event-global, erc-debug-irc-protocol, erc-log-irc-protocol,
erc-cmd-LOAD, erc-update-user, erc-update-current-channel-member,
erc-load-script, erc-mode-line-away-status-format): Doc fixes.
| -rw-r--r-- | lisp/erc/ChangeLog | 20 | ||||
| -rw-r--r-- | lisp/erc/erc.el | 116 |
2 files changed, 78 insertions, 58 deletions
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog index 385ada93035..dfb6fc7afe8 100644 --- a/lisp/erc/ChangeLog +++ b/lisp/erc/ChangeLog | |||
| @@ -1,3 +1,23 @@ | |||
| 1 | 2006-11-28 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * erc.el (erc-cmd-BANLIST, erc-cmd-MASSUNBAN): Simplify. | ||
| 4 | (erc-prompt-for-channel-key, erc-ignore-reply-list, erc-send-post-hook) | ||
| 5 | (erc-active-buffer, erc-join-buffer, erc-frame-alist, erc-with-buffer) | ||
| 6 | (erc-modules, erc-display-message-highlight, erc-process-input-line) | ||
| 7 | (erc-cmd-HELP, erc-server-hooks, erc-echo-notice-in-user-buffers) | ||
| 8 | (erc-format-my-nick, erc-echo-notice-in-user-and-target-buffers) | ||
| 9 | (erc-echo-notice-in-first-user-buffer, erc-connection-established) | ||
| 10 | (erc-update-user-nick, erc-update-channel-member, erc-highlight-notice) | ||
| 11 | (erc-command-symbol, erc-add-query, erc-process-script-line) | ||
| 12 | (erc-determine-parameters, erc-client-info, erc-popup-input-buffer): | ||
| 13 | (erc-script-echo): Fix typos in docstrings. | ||
| 14 | (erc-channel-user-op-p, erc-channel-user-voice-p, erc-startup-file-list) | ||
| 15 | (define-erc-module, erc-once-with-server-event) | ||
| 16 | (erc-once-with-server-event-global, erc-debug-irc-protocol) | ||
| 17 | (erc-log-irc-protocol, erc-cmd-LOAD, erc-update-user) | ||
| 18 | (erc-update-current-channel-member, erc-load-script): | ||
| 19 | (erc-mode-line-away-status-format): Doc fixes. | ||
| 20 | |||
| 1 | 2006-11-24 Juanma Barranquero <lekktu@gmail.com> | 21 | 2006-11-24 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 22 | ||
| 3 | * erc.el (erc-after-connect, erc-open-ssl-stream) | 23 | * erc.el (erc-after-connect, erc-open-ssl-stream) |
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 7bffc43ee77..a40da6f62c0 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el | |||
| @@ -474,7 +474,7 @@ Removes all users in the current channel. This is called by | |||
| 474 | (clrhash erc-channel-users))) | 474 | (clrhash erc-channel-users))) |
| 475 | 475 | ||
| 476 | (defsubst erc-channel-user-op-p (nick) | 476 | (defsubst erc-channel-user-op-p (nick) |
| 477 | "Return `t' if NICK is an operator in the current channel." | 477 | "Return t if NICK is an operator in the current channel." |
| 478 | (and nick | 478 | (and nick |
| 479 | (hash-table-p erc-channel-users) | 479 | (hash-table-p erc-channel-users) |
| 480 | (let ((cdata (erc-get-channel-user nick))) | 480 | (let ((cdata (erc-get-channel-user nick))) |
| @@ -482,7 +482,7 @@ Removes all users in the current channel. This is called by | |||
| 482 | (erc-channel-user-op (cdr cdata)))))) | 482 | (erc-channel-user-op (cdr cdata)))))) |
| 483 | 483 | ||
| 484 | (defsubst erc-channel-user-voice-p (nick) | 484 | (defsubst erc-channel-user-voice-p (nick) |
| 485 | "Return `t' if NICK has voice in the current channel." | 485 | "Return t if NICK has voice in the current channel." |
| 486 | (and nick | 486 | (and nick |
| 487 | (hash-table-p erc-channel-users) | 487 | (hash-table-p erc-channel-users) |
| 488 | (let ((cdata (erc-get-channel-user nick))) | 488 | (let ((cdata (erc-get-channel-user nick))) |
| @@ -774,7 +774,7 @@ set if some hacker is trying to flood you away." | |||
| 774 | :type 'boolean) | 774 | :type 'boolean) |
| 775 | 775 | ||
| 776 | (defcustom erc-prompt-for-channel-key nil | 776 | (defcustom erc-prompt-for-channel-key nil |
| 777 | "Prompt for channel key when using `erc-join-channel' interactively" | 777 | "Prompt for channel key when using `erc-join-channel' interactively." |
| 778 | :group 'erc | 778 | :group 'erc |
| 779 | :type 'boolean) | 779 | :type 'boolean) |
| 780 | 780 | ||
| @@ -807,7 +807,7 @@ whose identifier matches, the message will not be processed. | |||
| 807 | CAVEAT: ERC doesn't know about the user and host of anyone who | 807 | CAVEAT: ERC doesn't know about the user and host of anyone who |
| 808 | was already in the channel when you joined, but never said | 808 | was already in the channel when you joined, but never said |
| 809 | anything, so it won't be able to match the user and host of those | 809 | anything, so it won't be able to match the user and host of those |
| 810 | people. You can update the ERC internal info using /WHO *." | 810 | people. You can update the ERC internal info using /WHO *." |
| 811 | :group 'erc-ignore | 811 | :group 'erc-ignore |
| 812 | :type '(repeat regexp)) | 812 | :type '(repeat regexp)) |
| 813 | 813 | ||
| @@ -827,9 +827,9 @@ See `erc-server-flood-margin' for other flood-related parameters.") | |||
| 827 | "List of files to try for a startup script. | 827 | "List of files to try for a startup script. |
| 828 | The first existent and readable one will get executed. | 828 | The first existent and readable one will get executed. |
| 829 | 829 | ||
| 830 | If the filename ends with `.el' it is presumed to be an emacs-lisp | 830 | If the filename ends with `.el' it is presumed to be an Emacs Lisp |
| 831 | script and it gets (load)ed. Otherwise is is treated as a bunch of | 831 | script and it gets (load)ed. Otherwise is is treated as a bunch of |
| 832 | regular IRC commands" | 832 | regular IRC commands." |
| 833 | :group 'erc-scripts | 833 | :group 'erc-scripts |
| 834 | :type '(repeat file)) | 834 | :type '(repeat file)) |
| 835 | 835 | ||
| @@ -841,7 +841,7 @@ directory in the list." | |||
| 841 | :type '(repeat directory)) | 841 | :type '(repeat directory)) |
| 842 | 842 | ||
| 843 | (defcustom erc-script-echo t | 843 | (defcustom erc-script-echo t |
| 844 | "*If not-NIL, echo the IRC script commands locally." | 844 | "*If non-nil, echo the IRC script commands locally." |
| 845 | :group 'erc-scripts | 845 | :group 'erc-scripts |
| 846 | :type 'boolean) | 846 | :type 'boolean) |
| 847 | 847 | ||
| @@ -1042,7 +1042,7 @@ At this point, all modifications from prior hook functions are done. | |||
| 1042 | NOTE: The functions on this hook are called _before_ sending a command | 1042 | NOTE: The functions on this hook are called _before_ sending a command |
| 1043 | to the server. | 1043 | to the server. |
| 1044 | 1044 | ||
| 1045 | This function is called with narrowing, ala `erc-send-modify-hook'" | 1045 | This function is called with narrowing, ala `erc-send-modify-hook'." |
| 1046 | :group 'erc-hooks | 1046 | :group 'erc-hooks |
| 1047 | :type 'hook | 1047 | :type 'hook |
| 1048 | :options '(erc-make-read-only)) | 1048 | :options '(erc-make-read-only)) |
| @@ -1198,7 +1198,7 @@ DOC is the documentation string to use for the minor mode. | |||
| 1198 | ENABLE-BODY is a list of expressions used to enable the mode. | 1198 | ENABLE-BODY is a list of expressions used to enable the mode. |
| 1199 | DISABLE-BODY is a list of expressions used to disable the mode. | 1199 | DISABLE-BODY is a list of expressions used to disable the mode. |
| 1200 | If LOCAL-P is non-nil, the mode will be created as a buffer-local | 1200 | If LOCAL-P is non-nil, the mode will be created as a buffer-local |
| 1201 | mode. Rather than a global one. | 1201 | mode, rather than a global one. |
| 1202 | 1202 | ||
| 1203 | This will define a minor mode called erc-NAME-mode, possibly | 1203 | This will define a minor mode called erc-NAME-mode, possibly |
| 1204 | an alias erc-ALIAS-mode, as well as the helper functions | 1204 | an alias erc-ALIAS-mode, as well as the helper functions |
| @@ -1266,7 +1266,7 @@ You should make sure that `current-buffer' is a server buffer. | |||
| 1266 | This function temporarily adds a function to EVENT's hook to | 1266 | This function temporarily adds a function to EVENT's hook to |
| 1267 | execute FORMS. After FORMS are run, the function is removed from | 1267 | execute FORMS. After FORMS are run, the function is removed from |
| 1268 | EVENT's hook. The last expression of FORMS should be either nil | 1268 | EVENT's hook. The last expression of FORMS should be either nil |
| 1269 | or t. nil indicates that the other functions on EVENT's hook | 1269 | or t, where nil indicates that the other functions on EVENT's hook |
| 1270 | should be run too, and t indicates that other functions should | 1270 | should be run too, and t indicates that other functions should |
| 1271 | not be run. | 1271 | not be run. |
| 1272 | 1272 | ||
| @@ -1294,7 +1294,7 @@ capabilities." | |||
| 1294 | This function temporarily prepends a function to EVENT's hook to | 1294 | This function temporarily prepends a function to EVENT's hook to |
| 1295 | execute FORMS. After FORMS are run, the function is removed from | 1295 | execute FORMS. After FORMS are run, the function is removed from |
| 1296 | EVENT's hook. The last expression of FORMS should be either nil | 1296 | EVENT's hook. The last expression of FORMS should be either nil |
| 1297 | or t. nil indicates that the other functions on EVENT's hook | 1297 | or t, where nil indicates that the other functions on EVENT's hook |
| 1298 | should be run too, and t indicates that other functions should | 1298 | should be run too, and t indicates that other functions should |
| 1299 | not be run. | 1299 | not be run. |
| 1300 | 1300 | ||
| @@ -1390,7 +1390,7 @@ If BUFFER is nil, the current buffer is used." | |||
| 1390 | (defvar erc-active-buffer nil | 1390 | (defvar erc-active-buffer nil |
| 1391 | "The current active buffer, the one where the user typed the last command. | 1391 | "The current active buffer, the one where the user typed the last command. |
| 1392 | Defaults to the server buffer, and should only be set in the | 1392 | Defaults to the server buffer, and should only be set in the |
| 1393 | server buffer") | 1393 | server buffer.") |
| 1394 | (make-variable-buffer-local 'erc-active-buffer) | 1394 | (make-variable-buffer-local 'erc-active-buffer) |
| 1395 | 1395 | ||
| 1396 | (defun erc-active-buffer () | 1396 | (defun erc-active-buffer () |
| @@ -1447,7 +1447,7 @@ Turning on `erc-mode' runs the hook `erc-mode-hook'." | |||
| 1447 | 'window-noselect - in another window, but don't select that one, | 1447 | 'window-noselect - in another window, but don't select that one, |
| 1448 | 'frame - in another frame, | 1448 | 'frame - in another frame, |
| 1449 | 'bury - bury it in a new buffer, | 1449 | 'bury - bury it in a new buffer, |
| 1450 | any other value - in place of the current buffer" | 1450 | any other value - in place of the current buffer." |
| 1451 | :group 'erc-buffers | 1451 | :group 'erc-buffers |
| 1452 | :type '(choice (const window) | 1452 | :type '(choice (const window) |
| 1453 | (const window-noselect) | 1453 | (const window-noselect) |
| @@ -1457,7 +1457,7 @@ any other value - in place of the current buffer" | |||
| 1457 | 1457 | ||
| 1458 | (defcustom erc-frame-alist nil | 1458 | (defcustom erc-frame-alist nil |
| 1459 | "*Alist of frame parameters for creating erc frames. | 1459 | "*Alist of frame parameters for creating erc frames. |
| 1460 | A value of `nil means to use `default-frame-alist'." | 1460 | A value of nil means to use `default-frame-alist'." |
| 1461 | :group 'erc-buffers | 1461 | :group 'erc-buffers |
| 1462 | :type '(repeat (cons :format "%v" | 1462 | :type '(repeat (cons :format "%v" |
| 1463 | (symbol :tag "Parameter") | 1463 | (symbol :tag "Parameter") |
| @@ -1573,7 +1573,7 @@ SPEC should have the form | |||
| 1573 | If TARGET is a buffer, use it. Otherwise, use the buffer | 1573 | If TARGET is a buffer, use it. Otherwise, use the buffer |
| 1574 | matching TARGET in the process specified by PROCESS. | 1574 | matching TARGET in the process specified by PROCESS. |
| 1575 | 1575 | ||
| 1576 | If PROCESS is nil, use the current `erc-server-process' | 1576 | If PROCESS is nil, use the current `erc-server-process'. |
| 1577 | See `erc-get-buffer' for details. | 1577 | See `erc-get-buffer' for details. |
| 1578 | 1578 | ||
| 1579 | See also `with-current-buffer'. | 1579 | See also `with-current-buffer'. |
| @@ -1762,7 +1762,7 @@ all channel buffers on all servers." | |||
| 1762 | (defcustom erc-modules '(netsplit fill button match track completion readonly | 1762 | (defcustom erc-modules '(netsplit fill button match track completion readonly |
| 1763 | ring autojoin noncommands irccontrols | 1763 | ring autojoin noncommands irccontrols |
| 1764 | stamp list) | 1764 | stamp list) |
| 1765 | "A list of modules which erc should enable. | 1765 | "A list of modules which ERC should enable. |
| 1766 | If you set the value of this without using `customize' remember to call | 1766 | If you set the value of this without using `customize' remember to call |
| 1767 | \(erc-update-modules) after you change it. When using `customize', modules | 1767 | \(erc-update-modules) after you change it. When using `customize', modules |
| 1768 | removed from the list will be disabled." | 1768 | removed from the list will be disabled." |
| @@ -2137,7 +2137,7 @@ BUFFER. HOST and PORT specify the connection target." | |||
| 2137 | 2137 | ||
| 2138 | The buffer is created if it doesn't exist. | 2138 | The buffer is created if it doesn't exist. |
| 2139 | 2139 | ||
| 2140 | NOTE: If this variable is non-nil, and you kill the the only | 2140 | NOTE: If this variable is non-nil, and you kill the only |
| 2141 | visible \"*erc-protocol*\" buffer, it will be recreated shortly, | 2141 | visible \"*erc-protocol*\" buffer, it will be recreated shortly, |
| 2142 | but you won't see it. | 2142 | but you won't see it. |
| 2143 | 2143 | ||
| @@ -2152,7 +2152,7 @@ This only has any effect if `erc-debug-irc-protocol' is non-nil. | |||
| 2152 | The buffer is created if it doesn't exist. | 2152 | The buffer is created if it doesn't exist. |
| 2153 | 2153 | ||
| 2154 | If OUTBOUND is non-nil, STRING is being sent to the IRC server | 2154 | If OUTBOUND is non-nil, STRING is being sent to the IRC server |
| 2155 | and appears in erc-input-face in the buffer." | 2155 | and appears in face `erc-input-face' in the buffer." |
| 2156 | (when erc-debug-irc-protocol | 2156 | (when erc-debug-irc-protocol |
| 2157 | (let ((network-name (or (ignore-errors (erc-network-name)) | 2157 | (let ((network-name (or (ignore-errors (erc-network-name)) |
| 2158 | "???"))) | 2158 | "???"))) |
| @@ -2347,9 +2347,9 @@ If STRING is nil, the function does nothing." | |||
| 2347 | (erc-display-line-1 string (current-buffer)))))) | 2347 | (erc-display-line-1 string (current-buffer)))))) |
| 2348 | 2348 | ||
| 2349 | (defun erc-display-message-highlight (type string) | 2349 | (defun erc-display-message-highlight (type string) |
| 2350 | "Highlight STRING according to TYPE, where erc-TYPE-face is an erc face. | 2350 | "Highlight STRING according to TYPE, where erc-TYPE-face is an ERC face. |
| 2351 | 2351 | ||
| 2352 | See also `erc-make-notice'" | 2352 | See also `erc-make-notice'." |
| 2353 | (cond ((eq type 'notice) | 2353 | (cond ((eq type 'notice) |
| 2354 | (erc-make-notice string)) | 2354 | (erc-make-notice string)) |
| 2355 | (t | 2355 | (t |
| @@ -2435,7 +2435,7 @@ Returns non-nil if the command is actually sent to the server, and nil | |||
| 2435 | otherwise. | 2435 | otherwise. |
| 2436 | 2436 | ||
| 2437 | If the command in the LINE is not bound as a function `erc-cmd-<COMMAND>', | 2437 | If the command in the LINE is not bound as a function `erc-cmd-<COMMAND>', |
| 2438 | it is passed to `erc-cmd-default'. If LINE is not a command (ie. doesn't | 2438 | it is passed to `erc-cmd-default'. If LINE is not a command (i.e. doesn't |
| 2439 | start with /<COMMAND>) then it is sent as a message. | 2439 | start with /<COMMAND>) then it is sent as a message. |
| 2440 | 2440 | ||
| 2441 | An optional FORCE argument forces sending the line when flood | 2441 | An optional FORCE argument forces sending the line when flood |
| @@ -2661,7 +2661,7 @@ VERSION and so on. It is called with ARGS." | |||
| 2661 | 2661 | ||
| 2662 | If FUNC contains a valid function or variable, help about that | 2662 | If FUNC contains a valid function or variable, help about that |
| 2663 | will be displayed. If FUNC is empty, display an apropos about | 2663 | will be displayed. If FUNC is empty, display an apropos about |
| 2664 | erc commands. Otherwise, do apropos in the erc namespace | 2664 | ERC commands. Otherwise, do `apropos' in the ERC namespace |
| 2665 | \(\"erc-.*LINE\"\). | 2665 | \(\"erc-.*LINE\"\). |
| 2666 | 2666 | ||
| 2667 | Examples: | 2667 | Examples: |
| @@ -2787,9 +2787,9 @@ LINE has the format: \"#CHANNEL NICK REASON\" or \"NICK REASON\"." | |||
| 2787 | 2787 | ||
| 2788 | (defun erc-cmd-LOAD (line) | 2788 | (defun erc-cmd-LOAD (line) |
| 2789 | "Load the script provided in the LINE. | 2789 | "Load the script provided in the LINE. |
| 2790 | If LINE continues beyond the file name, | 2790 | If LINE continues beyond the file name, the rest of |
| 2791 | the rest of it is put in a (local) variable | 2791 | it is put in a (local) variable `erc-script-args', |
| 2792 | `erc-script-args', which can be used in elisp scripts. | 2792 | which can be used in Emacs Lisp scripts. |
| 2793 | 2793 | ||
| 2794 | The optional FORCE argument is ignored here - you can't force loading | 2794 | The optional FORCE argument is ignored here - you can't force loading |
| 2795 | a script after exceeding the flood threshold." | 2795 | a script after exceeding the flood threshold." |
| @@ -3356,7 +3356,7 @@ The ban list is fetched from the server if necessary." | |||
| 3356 | (and (boundp 'fill-column) | 3356 | (and (boundp 'fill-column) |
| 3357 | fill-column) | 3357 | fill-column) |
| 3358 | (1- (window-width)))) | 3358 | (1- (window-width)))) |
| 3359 | (separator (make-string erc-fill-column (string-to-char "="))) | 3359 | (separator (make-string erc-fill-column ?=)) |
| 3360 | (fmt (concat | 3360 | (fmt (concat |
| 3361 | "%-" (number-to-string (/ erc-fill-column 2)) "s" | 3361 | "%-" (number-to-string (/ erc-fill-column 2)) "s" |
| 3362 | "%" (number-to-string (/ erc-fill-column 2)) "s"))) | 3362 | "%" (number-to-string (/ erc-fill-column 2)) "s"))) |
| @@ -3422,7 +3422,7 @@ Unban all currently banned users in the current channel." | |||
| 3422 | (lambda (x) | 3422 | (lambda (x) |
| 3423 | (erc-server-send | 3423 | (erc-server-send |
| 3424 | (format "MODE %s -%s %s" (erc-default-target) | 3424 | (format "MODE %s -%s %s" (erc-default-target) |
| 3425 | (make-string (length x) (string-to-char "b")) | 3425 | (make-string (length x) ?b) |
| 3426 | (mapconcat 'identity x " ")))) | 3426 | (mapconcat 'identity x " ")))) |
| 3427 | (erc-group-list bans 3)))) | 3427 | (erc-group-list bans 3)))) |
| 3428 | t)))) | 3428 | t)))) |
| @@ -3800,7 +3800,7 @@ See also `erc-display-error-notice'." | |||
| 3800 | 3800 | ||
| 3801 | (defgroup erc-server-hooks nil | 3801 | (defgroup erc-server-hooks nil |
| 3802 | "Server event callbacks. | 3802 | "Server event callbacks. |
| 3803 | Every server event - like numeric replies - has it's own hook. | 3803 | Every server event - like numeric replies - has its own hook. |
| 3804 | Those hooks are all called using `run-hook-with-args-until-success'. | 3804 | Those hooks are all called using `run-hook-with-args-until-success'. |
| 3805 | They receive as first argument the process object from where the event | 3805 | They receive as first argument the process object from where the event |
| 3806 | originated from, | 3806 | originated from, |
| @@ -3879,7 +3879,7 @@ See also `erc-format-nick-function'." | |||
| 3879 | (concat voice op (erc-server-user-nickname user))))) | 3879 | (concat voice op (erc-server-user-nickname user))))) |
| 3880 | 3880 | ||
| 3881 | (defun erc-format-my-nick () | 3881 | (defun erc-format-my-nick () |
| 3882 | "Return the beginning of this user's message, correctly propertized" | 3882 | "Return the beginning of this user's message, correctly propertized." |
| 3883 | (if erc-show-my-nick | 3883 | (if erc-show-my-nick |
| 3884 | (let ((open "<") | 3884 | (let ((open "<") |
| 3885 | (close "> ") | 3885 | (close "> ") |
| @@ -3948,7 +3948,7 @@ returns non-nil iff there is at least one buffer for which the | |||
| 3948 | sender is a member. | 3948 | sender is a member. |
| 3949 | 3949 | ||
| 3950 | See also: `erc-echo-notice-in-first-user-buffer', | 3950 | See also: `erc-echo-notice-in-first-user-buffer', |
| 3951 | `erc-buffer-list-with-nick'" | 3951 | `erc-buffer-list-with-nick'." |
| 3952 | (let ((buffers (erc-buffer-list-with-nick sender erc-server-process))) | 3952 | (let ((buffers (erc-buffer-list-with-nick sender erc-server-process))) |
| 3953 | (if buffers | 3953 | (if buffers |
| 3954 | (progn (erc-display-message parsed nil buffers s) t) | 3954 | (progn (erc-display-message parsed nil buffers s) t) |
| @@ -3963,7 +3963,7 @@ at least one buffer for which the sender is a member or the | |||
| 3963 | default target. | 3963 | default target. |
| 3964 | 3964 | ||
| 3965 | See also: `erc-echo-notice-in-user-buffers', | 3965 | See also: `erc-echo-notice-in-user-buffers', |
| 3966 | `erc-buffer-list-with-nick'" | 3966 | `erc-buffer-list-with-nick'." |
| 3967 | (let ((buffers (erc-buffer-list-with-nick sender erc-server-process))) | 3967 | (let ((buffers (erc-buffer-list-with-nick sender erc-server-process))) |
| 3968 | (add-to-list 'buffers buffer) | 3968 | (add-to-list 'buffers buffer) |
| 3969 | (if buffers | 3969 | (if buffers |
| @@ -3978,7 +3978,7 @@ returns non-nil iff there is at least one buffer for which the | |||
| 3978 | sender is a member. | 3978 | sender is a member. |
| 3979 | 3979 | ||
| 3980 | See also: `erc-echo-notice-in-user-buffers', | 3980 | See also: `erc-echo-notice-in-user-buffers', |
| 3981 | `erc-buffer-list-with-nick'" | 3981 | `erc-buffer-list-with-nick'." |
| 3982 | (let ((buffers (erc-buffer-list-with-nick sender erc-server-process))) | 3982 | (let ((buffers (erc-buffer-list-with-nick sender erc-server-process))) |
| 3983 | (if buffers | 3983 | (if buffers |
| 3984 | (progn (erc-display-message parsed nil (car buffers) s) t) | 3984 | (progn (erc-display-message parsed nil (car buffers) s) t) |
| @@ -4061,7 +4061,7 @@ See also: `erc-echo-notice-in-user-buffers', | |||
| 4061 | (defun erc-connection-established (proc parsed) | 4061 | (defun erc-connection-established (proc parsed) |
| 4062 | "Run just after connection. | 4062 | "Run just after connection. |
| 4063 | 4063 | ||
| 4064 | Set user modes and run `erc-after-connect hook'." | 4064 | Set user modes and run `erc-after-connect' hook." |
| 4065 | (unless erc-server-connected ; only once per session | 4065 | (unless erc-server-connected ; only once per session |
| 4066 | (let ((server (or erc-server-announced-name (erc-response.sender parsed))) | 4066 | (let ((server (or erc-server-announced-name (erc-response.sender parsed))) |
| 4067 | (nick (car (erc-response.command-args parsed )))) | 4067 | (nick (car (erc-response.command-args parsed )))) |
| @@ -4391,7 +4391,7 @@ The buffer where the change happened is current while this hook is called." | |||
| 4391 | "Updates the stored user information for the user with nickname | 4391 | "Updates the stored user information for the user with nickname |
| 4392 | NICK. | 4392 | NICK. |
| 4393 | 4393 | ||
| 4394 | See also: `erc-update-user'" | 4394 | See also: `erc-update-user'." |
| 4395 | (erc-update-user (erc-get-server-user nick) new-nick | 4395 | (erc-update-user (erc-get-server-user nick) new-nick |
| 4396 | host login full-name info)) | 4396 | host login full-name info)) |
| 4397 | 4397 | ||
| @@ -4402,9 +4402,9 @@ struct. Any of NEW-NICK, HOST, LOGIN, FULL-NAME, INFO which are | |||
| 4402 | non-nil and not equal to the existing values for USER are used to | 4402 | non-nil and not equal to the existing values for USER are used to |
| 4403 | replace the stored values in USER. | 4403 | replace the stored values in USER. |
| 4404 | 4404 | ||
| 4405 | If, any only if a change is made, | 4405 | If, and only if, a change is made, |
| 4406 | `erc-channel-members-changed-hook' is run for each channel for | 4406 | `erc-channel-members-changed-hook' is run for each channel for |
| 4407 | which USER is a member, and `t' is returned." | 4407 | which USER is a member, and t is returned." |
| 4408 | (let (changed) | 4408 | (let (changed) |
| 4409 | (when user | 4409 | (when user |
| 4410 | (when (and new-nick | 4410 | (when (and new-nick |
| @@ -4441,10 +4441,10 @@ which USER is a member, and `t' is returned." | |||
| 4441 | update-message-time) | 4441 | update-message-time) |
| 4442 | "Updates the stored user information for the user with nickname | 4442 | "Updates the stored user information for the user with nickname |
| 4443 | NICK. `erc-update-user' is called to handle changes to nickname, | 4443 | NICK. `erc-update-user' is called to handle changes to nickname, |
| 4444 | host, login, full-name, and info. If `op' or `voice' are | 4444 | HOST, LOGIN, FULL-NAME, and INFO. If OP or VOICE are non-nil, |
| 4445 | non-nil, they must be equal to either `on' or `off', in which | 4445 | they must be equal to either `on' or `off', in which case the |
| 4446 | case the operator or voice status of USER in the current channel | 4446 | operator or voice status of the user in the current channel is |
| 4447 | is changed accordingly. If `update-message-time' is non-nil, the | 4447 | changed accordingly. If UPDATE-MESSAGE-TIME is non-nil, the |
| 4448 | last-message-time of the user in the current channel is set | 4448 | last-message-time of the user in the current channel is set |
| 4449 | to (current-time). | 4449 | to (current-time). |
| 4450 | 4450 | ||
| @@ -4453,7 +4453,7 @@ information if it is not already present in the user or channel | |||
| 4453 | lists. | 4453 | lists. |
| 4454 | 4454 | ||
| 4455 | If, and only if, changes are made, or the user is added, | 4455 | If, and only if, changes are made, or the user is added, |
| 4456 | `erc-channel-members-updated-hook' is run, and `t' is returned. | 4456 | `erc-channel-members-updated-hook' is run, and t is returned. |
| 4457 | 4457 | ||
| 4458 | See also: `erc-update-user' and `erc-update-channel-member'." | 4458 | See also: `erc-update-user' and `erc-update-channel-member'." |
| 4459 | (let* (changed user-changed | 4459 | (let* (changed user-changed |
| @@ -4519,7 +4519,7 @@ See also: `erc-update-user' and `erc-update-channel-member'." | |||
| 4519 | "Updates user and channel information for the user with | 4519 | "Updates user and channel information for the user with |
| 4520 | nickname NICK in channel CHANNEL. | 4520 | nickname NICK in channel CHANNEL. |
| 4521 | 4521 | ||
| 4522 | See also: `erc-update-current-channel-member'" | 4522 | See also: `erc-update-current-channel-member'." |
| 4523 | (erc-with-buffer | 4523 | (erc-with-buffer |
| 4524 | (channel) | 4524 | (channel) |
| 4525 | (erc-update-current-channel-member nick new-nick add op voice host | 4525 | (erc-update-current-channel-member nick new-nick add op voice host |
| @@ -4527,8 +4527,8 @@ See also: `erc-update-current-channel-member'" | |||
| 4527 | update-message-time))) | 4527 | update-message-time))) |
| 4528 | 4528 | ||
| 4529 | (defun erc-remove-current-channel-member (nick) | 4529 | (defun erc-remove-current-channel-member (nick) |
| 4530 | "Remove NICK from current channel membership list. Runs | 4530 | "Remove NICK from current channel membership list. |
| 4531 | `erc-channel-members-changed-hook'." | 4531 | Runs `erc-channel-members-changed-hook'." |
| 4532 | (let ((channel-data (erc-get-channel-user nick))) | 4532 | (let ((channel-data (erc-get-channel-user nick))) |
| 4533 | (when channel-data | 4533 | (when channel-data |
| 4534 | (erc-remove-channel-user nick) | 4534 | (erc-remove-channel-user nick) |
| @@ -4733,7 +4733,7 @@ So far the following TYPE/L pairs are supported: | |||
| 4733 | 4733 | ||
| 4734 | (defun erc-highlight-notice (s) | 4734 | (defun erc-highlight-notice (s) |
| 4735 | "Highlight notice message S and return it. | 4735 | "Highlight notice message S and return it. |
| 4736 | See also variable `erc-notice-highlight-type'" | 4736 | See also variable `erc-notice-highlight-type'." |
| 4737 | (cond | 4737 | (cond |
| 4738 | ((eq erc-notice-highlight-type 'prefix) | 4738 | ((eq erc-notice-highlight-type 'prefix) |
| 4739 | (erc-put-text-property 0 (length erc-notice-prefix) | 4739 | (erc-put-text-property 0 (length erc-notice-prefix) |
| @@ -4950,7 +4950,7 @@ current position." | |||
| 4950 | (run-hooks 'erc-send-post-hook)))))) | 4950 | (run-hooks 'erc-send-post-hook)))))) |
| 4951 | 4951 | ||
| 4952 | (defun erc-command-symbol (command) | 4952 | (defun erc-command-symbol (command) |
| 4953 | "Return the erc command symbol for COMMAND if it exists and is bound." | 4953 | "Return the ERC command symbol for COMMAND if it exists and is bound." |
| 4954 | (let ((cmd (intern-soft (format "erc-cmd-%s" (upcase command))))) | 4954 | (let ((cmd (intern-soft (format "erc-cmd-%s" (upcase command))))) |
| 4955 | (when (fboundp cmd) cmd))) | 4955 | (when (fboundp cmd) cmd))) |
| 4956 | 4956 | ||
| @@ -5049,7 +5049,7 @@ See also `erc-downcase'." | |||
| 5049 | (defun erc-add-query (nickname) | 5049 | (defun erc-add-query (nickname) |
| 5050 | "Add QUERY'd NICKNAME to the default channel list. | 5050 | "Add QUERY'd NICKNAME to the default channel list. |
| 5051 | 5051 | ||
| 5052 | The previous default target of QUERY type gets removed" | 5052 | The previous default target of QUERY type gets removed." |
| 5053 | (let ((d1 (car erc-default-recipients)) | 5053 | (let ((d1 (car erc-default-recipients)) |
| 5054 | (d2 (cdr erc-default-recipients)) | 5054 | (d2 (cdr erc-default-recipients)) |
| 5055 | (qt (cons 'QUERY (downcase nickname)))) | 5055 | (qt (cons 'QUERY (downcase nickname)))) |
| @@ -5274,8 +5274,8 @@ See also `erc-startup-file-list'." | |||
| 5274 | 5274 | ||
| 5275 | FILE must be the full name, it is not searched in the | 5275 | FILE must be the full name, it is not searched in the |
| 5276 | `erc-script-path'. If the filename ends with `.el', then load it | 5276 | `erc-script-path'. If the filename ends with `.el', then load it |
| 5277 | as a emacs-lisp program. Otherwise, treat it as a regular IRC | 5277 | as an Emacs Lisp program. Otherwise, treat it as a regular IRC |
| 5278 | script" | 5278 | script." |
| 5279 | (erc-log (concat "erc-load-script: " file)) | 5279 | (erc-log (concat "erc-load-script: " file)) |
| 5280 | (cond | 5280 | (cond |
| 5281 | ((string-match "\\.el$" file) | 5281 | ((string-match "\\.el$" file) |
| @@ -5287,13 +5287,13 @@ script" | |||
| 5287 | "Process an IRC script LINE. | 5287 | "Process an IRC script LINE. |
| 5288 | 5288 | ||
| 5289 | Does script-specific substitutions (script arguments, current nick, | 5289 | Does script-specific substitutions (script arguments, current nick, |
| 5290 | server, etc.) in LINE and returns it. | 5290 | server, etc.) in LINE and returns it. |
| 5291 | 5291 | ||
| 5292 | Substitutions are: %C and %c = current target (channel or nick), | 5292 | Substitutions are: %C and %c = current target (channel or nick), |
| 5293 | %S %s = current server, %N %n = my current nick, and %x is x verbatim, | 5293 | %S %s = current server, %N %n = my current nick, and %x is x verbatim, |
| 5294 | where x is any other character; | 5294 | where x is any other character; |
| 5295 | $* = the entire argument string, $1 = the first argument, $2 = the second, | 5295 | $* = the entire argument string, $1 = the first argument, $2 = the second, |
| 5296 | end so on." | 5296 | and so on." |
| 5297 | (if (not args) (setq args "")) | 5297 | (if (not args) (setq args "")) |
| 5298 | (let* ((arg-esc-regexp "\\(\\$\\(\\*\\|[1-9][0-9]*\\)\\)\\([^0-9]\\|$\\)") | 5298 | (let* ((arg-esc-regexp "\\(\\$\\(\\*\\|[1-9][0-9]*\\)\\)\\([^0-9]\\|$\\)") |
| 5299 | (percent-regexp "\\(%.\\)") | 5299 | (percent-regexp "\\(%.\\)") |
| @@ -5418,10 +5418,10 @@ user input." | |||
| 5418 | "Determine the connection and authentication parameters. | 5418 | "Determine the connection and authentication parameters. |
| 5419 | Sets the buffer local variables: | 5419 | Sets the buffer local variables: |
| 5420 | 5420 | ||
| 5421 | - erc-session-server | 5421 | - `erc-session-server' |
| 5422 | - erc-session-port | 5422 | - `erc-session-port' |
| 5423 | - erc-session-full-name | 5423 | - `erc-session-full-name' |
| 5424 | - erc-server-current-nick" | 5424 | - `erc-server-current-nick'" |
| 5425 | (setq erc-session-server (erc-compute-server server) | 5425 | (setq erc-session-server (erc-compute-server server) |
| 5426 | erc-session-port (or port erc-default-port) | 5426 | erc-session-port (or port erc-default-port) |
| 5427 | erc-session-user-full-name (erc-compute-full-name name)) | 5427 | erc-session-user-full-name (erc-compute-full-name name)) |
| @@ -5563,7 +5563,7 @@ See also `erc-emacs-time-to-erc-time'." | |||
| 5563 | 5563 | ||
| 5564 | (defun erc-client-info (s) | 5564 | (defun erc-client-info (s) |
| 5565 | "Return CTCP CLIENTINFO on command S. | 5565 | "Return CTCP CLIENTINFO on command S. |
| 5566 | If S is NIL or an empty string then return general CLIENTINFO" | 5566 | If S is nil or an empty string then return general CLIENTINFO." |
| 5567 | (if (or (not s) (string= s "")) | 5567 | (if (or (not s) (string= s "")) |
| 5568 | (concat | 5568 | (concat |
| 5569 | (apply #'concat | 5569 | (apply #'concat |
| @@ -5701,7 +5701,7 @@ displayed hostnames." | |||
| 5701 | "(AWAY since %a %b %d %H:%M) " | 5701 | "(AWAY since %a %b %d %H:%M) " |
| 5702 | "When you're away on a server, this is shown in the mode line. | 5702 | "When you're away on a server, this is shown in the mode line. |
| 5703 | This should be a string with substitution variables recognized by | 5703 | This should be a string with substitution variables recognized by |
| 5704 | format-time-message." | 5704 | `format-time-string'." |
| 5705 | :group 'erc-mode-line-and-header | 5705 | :group 'erc-mode-line-and-header |
| 5706 | :type 'string) | 5706 | :type 'string) |
| 5707 | 5707 | ||
| @@ -5918,7 +5918,7 @@ All windows are opened in the current frame." | |||
| 5918 | (balance-windows))))) | 5918 | (balance-windows))))) |
| 5919 | 5919 | ||
| 5920 | (defun erc-popup-input-buffer () | 5920 | (defun erc-popup-input-buffer () |
| 5921 | "Provide a input buffer." | 5921 | "Provide an input buffer." |
| 5922 | (interactive) | 5922 | (interactive) |
| 5923 | (let ((buffer-name (generate-new-buffer-name "*ERC input*")) | 5923 | (let ((buffer-name (generate-new-buffer-name "*ERC input*")) |
| 5924 | (mode (intern | 5924 | (mode (intern |