"The last time the user sent something.")
(defvar erc-autoaway-caused-away nil
- "Indicates whether this module was responsible for setting the
-user's away status.")
+ "Non-nil if this module was responsible for setting the user's away status.")
(defvar erc-autoaway-idle-seconds)
This variable is only set in a server buffer.")
(defvar-local erc-server-filter-data nil
- "The data that arrived from the server
-but has not been processed yet.")
+ "The data that arrived from the server but has not been processed yet.")
(defvar-local erc-server-duplicates (make-hash-table :test 'equal)
"Internal variable used to track duplicate messages.")
:type 'boolean)
(defcustom erc-server-reconnect-attempts 2
- "The number of times that ERC will attempt to reestablish a
-broken connection, or t to always attempt to reconnect.
+ "Number of times that ERC will attempt to reestablish a broken connection.
+If t, always attempt to reconnect.
This only has an effect if `erc-server-auto-reconnect' is non-nil."
:type '(choice (const :tag "Always reconnect" t)
integer))
(defcustom erc-server-reconnect-timeout 1
- "The amount of time, in seconds, that ERC will wait between
-successive reconnect attempts.
+ "Number of seconds to wait between successive reconnect attempts.
If a key is pressed while ERC is waiting, it will stop waiting."
:type 'number)
:type 'integer)
(defcustom erc-dcc-pump-bytes nil
- "If set to an integer, keep sending until that number of bytes are
-unconfirmed."
+ "If an integer, keep sending until that number of bytes are unconfirmed."
:type '(choice (const nil) integer))
(define-inline erc-dcc-get-parent (proc)
(defcustom erc-dcc-send-connect-hook
'(erc-dcc-display-send erc-dcc-send-block)
- "Hook run whenever the remote end of a DCC SEND offer connected to your
-listening port."
+ "Hook run when remote end of a DCC SEND offer connected to your listening port."
:type 'hook)
(defun erc-dcc-nick (plist)
(buffer-string)))
(defun erc-dcc-send-file (nick file &optional pproc)
- "Open a socket for incoming connections, and send a CTCP send request to the
+ "Open socket for incoming connections and send a CTCP send request to the
other client."
(interactive "sNick: \nfFile: ")
(when (null pproc) (if (processp erc-server-process)
:type 'hook)
(defcustom erc-dcc-chat-connect-hook nil
- ""
+ "" ; FIXME
:type 'hook)
(defcustom erc-dcc-chat-exit-hook nil
- ""
+ "" ; FIXME
:type 'hook)
(defun erc-cmd-CREQ (line &optional _force)
function))
(defcustom erc-fill-static-center 27
- "Column around which all statically filled messages will be
-centered. This column denotes the point where the ` ' character
-between <nickname> and the entered text will be put, thus aligning
-nick names right and text left."
+ "Column around which all statically filled messages will be centered.
+This column denotes the point where the ` ' character between
+<nickname> and the entered text will be put, thus aligning nick
+names right and text left."
:type 'integer)
(defcustom erc-fill-variable-maximum-indentation 17
- "If we indent a line after a long nick, don't indent more then this
-characters. Set to nil to disable."
+ "Don't indent a line after a long nick more than this many characters.
+Set to nil to disable."
:type 'integer)
(defcustom erc-fill-column 78
:group 'erc)
(defcustom erc-identd-port 8113
- "Port to run the identd server on if not specified in the argument for
+ "Port to run the identd server on.
+This can be overridden by specifying an argument for
`erc-identd-start'.
This can be either a string or a number."
(erc-autojoin-channels server nick))))
(defun erc-autojoin-server-match (candidate)
- "Match the current network or server against CANDIDATE
+ "Match the current network or server against CANDIDATE.
This should be a key from `erc-autojoin-channels-alist'."
(or (eq candidate (erc-network))
(and (stringp candidate)
:type 'boolean)
(defcustom erc-log-write-after-insert nil
- "If non-nil, write to log file when new text is added to a
-logged ERC buffer.
+ "If non-nil, write to log file when new text is added to a logged ERC buffer.
If you set this to nil, you may want to enable both
`erc-save-buffer-on-part' and `erc-save-queries-on-quit'."
:type 'coding-system)
(defcustom erc-log-filter-function nil
- "If non-nil, pass text through the given function before writing it to
-a log file.
+ "If non-nil, pass text to this function before writing it to a log file.
The function should take one argument, which is the text to filter."
:type '(choice (function "Function")
(concat (buffer-name buffer) ".txt"))
(defun erc-generate-log-file-name-long (_buffer target nick server port)
- "Generates a log-file name in the way ERC always did it.
+ "Generate a log-file name in the way ERC always did it.
This results in a file name of the form #channel!nick@server:port.txt.
This function is a possible value for `erc-generate-log-file-name-function'."
(let ((file (concat
(declare-function erc-network-name "erc-networks" ())
(defun erc-generate-log-file-name-network (buffer target nick server _port)
- "Generates a log-file name using the network name rather than server name.
+ "Generate a log-file name using the network name rather than server name.
This results in a file name of the form #channel!nick@network.txt.
This function is a possible value for `erc-generate-log-file-name-function'."
(require 'erc-networks)
:type '(repeat regexp))
(defcustom erc-current-nick-highlight-type 'keyword
- "Determines how to highlight text in which your current nickname appears
+ "Determine how to highlight text in which your current nickname appears
\(does not apply to text sent by you).
The following values are allowed:
:type 'hook)
(defcustom erc-match-exclude-server-buffer nil
- "If true, don't perform match on the server buffer; this is
-useful for excluding all the things like MOTDs from the server
-and other miscellaneous functions."
+ "If true, don't perform match on the server buffer.
+This is useful for excluding all the things like MOTDs from the
+server and other miscellaneous functions."
:version "24.3"
:type 'boolean)
"ERC menu definition.")
(defvar erc-menu-defined nil
- "Internal variable used to keep track of whether we've defined the
-ERC menu yet.")
+ "Internal variable used to keep track of whether we've defined the ERC menu yet.")
;;;###autoload(autoload 'erc-menu-mode "erc-menu" nil t)
(define-erc-module menu nil
:group 'erc)
(defcustom erc-notify-list nil
- "List of nicknames you want to be notified about online/offline
-status change."
+ "List of nicknames you want to be notified about online/offline status change."
:type '(repeat string))
(defcustom erc-notify-interval 60
- "Time interval (in seconds) for checking online status of notified
-people."
+ "Time interval (in seconds) for checking online status of notified people."
:type 'integer)
(defcustom erc-notify-signon-hook nil
:type 'string)
(defcustom erc-pcomplete-order-nickname-completions t
- "If t, channel nickname completions will be ordered such that
-the most recent speakers are listed first."
+ "If t, order nickname completions with the most recent speakers first."
:type 'boolean)
;;;###autoload(autoload 'erc-completion-mode "erc-pcomplete" nil t)
(erc-log (format "Playing sound file %S" filepath))))
(defun erc-toggle-sound (&optional arg)
- "Toggles playing sounds on and off.
+ "Toggle playing sounds on and off.
With positive argument, turns them on. With any other argument
turns sounds off."
(interactive "P")
(erc-echo-timestamp dir ct))))))))
(defvar-local erc-timestamp-last-window-width nil
- "Stores the width of the last window that showed the current
-buffer. This is used by `erc-insert-timestamp-right' when the
-current buffer is not shown in any window.")
+ "The width of the last window that showed the current buffer.
+his is used by `erc-insert-timestamp-right' when the current
+buffer is not shown in any window.")
(defvar-local erc-timestamp-last-inserted nil
"Last timestamp inserted into the buffer.")
`erc-timestamp-left-and-right'")
(defcustom erc-timestamp-only-if-changed-flag t
- "Insert timestamp only if its value changed since last insertion.
+ "Non-nil means insert timestamp only if its value changed since last insertion.
If `erc-insert-timestamp-function' is `erc-insert-timestamp-left', a
string of spaces which is the same size as the timestamp is added to
the beginning of the line in its place. If you use
(erc-put-text-property from (1+ (point)) 'cursor-intangible t)))))
(defun erc-insert-timestamp-left-and-right (_string)
- "This is another function that can be assigned to
-`erc-insert-timestamp-function'. If the date is changed, it will
-print a blank line, the date, and another blank line. If the time is
-changed, it will then print it off to the right."
+ "This is another function that can be used with `erc-insert-timestamp-function'.
+If the date is changed, it will print a blank line, the date, and
+another blank line. If the time is changed, it will then print
+it off to the right."
(let* ((ct (current-time))
(ts-left (erc-format-timestamp ct erc-timestamp-format-left))
(ts-right (erc-format-timestamp ct erc-timestamp-format-right)))
:type 'erc-message-type)
(defcustom erc-track-exclude-server-buffer nil
- "If true, don't perform tracking on the server buffer; this is
-useful for excluding all the things like MOTDs from the server and
-other miscellaneous functions."
+ "If true, don't perform tracking on the server buffer.
+This is useful for excluding all the things like MOTDs from the
+server and other miscellaneous functions."
:type 'boolean)
(defcustom erc-track-shorten-start 1
- "This number specifies the minimum number of characters a channel name in
-the mode-line should be reduced to."
+ "Minimum number of characters for a channel name in the mode-line."
:type 'number)
(defcustom erc-track-shorten-cutoff 4
function))
(defcustom erc-track-list-changed-hook nil
- "Hook that is run whenever the contents of
-`erc-modified-channels-alist' changes.
+ "Hook run when the contents of `erc-modified-channels-alist' changes.
This is useful for people that don't use the default mode-line
notification but instead use a separate mechanism to provide
window-configuration.")
(defun erc-modified-channels-update (&rest _args)
- "This function updates the information in `erc-modified-channels-alist'
-according to buffer visibility. It calls
-`erc-modified-channels-display' at the end. This should usually be
-called via `window-configuration-change-hook'.
+ "Update `erc-modified-channels-alist' according to buffer visibility.
+It calls `erc-modified-channels-display' at the end. This should
+usually be called via `window-configuration-change-hook'.
ARGS are ignored."
(interactive)
(unless erc-modified-channels-update-inside
name))
(defun erc-modified-channels-display ()
- "Set `erc-modified-channels-object'
-according to `erc-modified-channels-alist'.
+ "Set `erc-modified-channels-object' according to `erc-modified-channels-alist'.
Use `erc-make-mode-line-buffer-name' to create buttons."
(cond ((or (eq 'mostactive erc-track-switch-direction)
(eq 'leastactive erc-track-switch-direction))
choice))))
(defun erc-track-modified-channels ()
- "Hook function for `erc-insert-post-hook' to check if the current
-buffer should be added to the mode line as a hidden, modified
-channel. Assumes it will only be called when current-buffer
-is in `erc-mode'."
+ "Hook function for `erc-insert-post-hook'.
+Check if the current buffer should be added to the mode line as a
+hidden, modified channel. Assumes it will only be called when
+the current buffer is in `erc-mode'."
(let ((this-channel (or (erc-default-target)
(buffer-name (current-buffer)))))
(if (and (not (erc-buffer-visible (current-buffer)))
;;; Buffer switching
(defvar erc-track-last-non-erc-buffer nil
- "Stores the name of the last buffer you were in before activating
-`erc-track-switch-buffer'.")
+ "Name of the last buffer before activating `erc-track-switch-buffer'.")
(defun erc-track-sort-by-activest ()
"Sort erc-modified-channels-alist by activity.
(lambda (a b) (> (nth 1 a) (nth 1 b))))))
(defun erc-track-face-priority (face)
- "Return a number indicating the priority of FACE in
-`erc-track-faces-priority-list'. Lower number means higher
-priority.
+ "Return priority (a number) of FACE in `erc-track-faces-priority-list'.
+Lower number means higher priority.
If face is not in `erc-track-faces-priority-list', it will have a
higher number than any other face in that list."
:type 'string)
(defcustom erc-try-new-nick-p t
- "If the nickname you chose isn't available, and this option is non-nil,
-ERC should automatically attempt to connect with another nickname.
-
+ "Non-nil means attempt to connect with another nickname if nickname unavailable.
You can manually set another nickname with the /NICK command."
:group 'erc
:type 'boolean)
(defvar-local erc-channel-users nil
- "A hash table of members in the current channel, which
-associates nicknames with cons cells of the form:
+ "Hash table of members in the current channel.
+It associates nicknames with cons cells of the form:
\(USER . MEMBER-DATA) where USER is a pointer to an
erc-server-user struct, and MEMBER-DATA is a pointer to an
erc-channel-user struct.")
(defvar-local erc-server-users nil
- "A hash table of users on the current server, which associates
-nicknames with erc-server-user struct instances.")
+ "Hash table of users on the current server.
+It associates nicknames with `erc-server-user' struct instances.")
(defun erc-downcase (string)
"Convert STRING to IRC standard conforming downcase."
(last-message-time nil))
(define-inline erc-get-channel-user (nick)
- "Find the (USER . CHANNEL-DATA) element corresponding to NICK
-in the current buffer's `erc-channel-users' hash table."
+ "Find NICK in the current buffer's `erc-channel-users' hash table."
(inline-quote (gethash (erc-downcase ,nick) erc-channel-users)))
(define-inline erc-get-server-user (nick)
- "Find the USER corresponding to NICK in the current server's
-`erc-server-users' hash table."
+ "Find NICK in the current server's `erc-server-users' hash table."
(inline-letevals (nick)
(inline-quote (erc-with-server-buffer
(gethash (erc-downcase ,nick) erc-server-users)))))
(null (erc-default-target)))))
(defun erc-open-server-buffer-p (&optional buffer)
- "Return non-nil if argument BUFFER is an ERC server buffer that
-has an open IRC process.
+ "Return non-nil if BUFFER is an ERC server buffer with an open IRC process.
If BUFFER is nil, the current buffer is used."
(and (erc-server-buffer-p buffer)
(put 'erc-cmd-QUOTE 'do-not-parse-args t)
(defcustom erc-query-display 'window
- "Indicates how to display query buffers when using the /QUERY
-command to talk to someone.
+ "How to display query buffers when using the /QUERY command to talk to someone.
The default behavior is to display the message in a new window
and bring it to the front. See the documentation for
:type 'boolean)
(defcustom erc-format-query-as-channel-p t
- "If non-nil, format text from others in a query buffer like in a channel,
-otherwise format like a private message."
+ "If non-nil, format text from others in a query buffer like in a channel.
+Otherwise format like a private message."
:group 'erc-query
:type 'boolean)
t)
(defun erc-echo-notice-in-user-buffers (s parsed _buffer sender)
- "Echo a private notice in all of the buffers for which SENDER
-is a member. This function is designed to be added to either
+ "Echo a private notice in all of the buffers for which SENDER is a member.
+This function is designed to be added to either
`erc-echo-notice-hook' or `erc-echo-notice-always-hook', and
returns non-nil if there is at least one buffer for which the
sender is a member.
nil)))
(defun erc-echo-notice-in-user-and-target-buffers (s parsed buffer sender)
- "Echo a private notice in BUFFER and in all of the buffers for
-which SENDER is a member. This function is designed to be added
-to either `erc-echo-notice-hook' or
-`erc-echo-notice-always-hook', and returns non-nil if there is
-at least one buffer for which the sender is a member or the
-default target.
+ "Echo a private notice in BUFFER and in all buffers for which SENDER is a member.
+This function is designed to be added to either
+`erc-echo-notice-hook' or `erc-echo-notice-always-hook', and
+returns non-nil if there is at least one buffer for which the
+sender is a member or the default target.
See also: `erc-echo-notice-in-user-buffers',
`erc-buffer-list-with-nick'."
nil)))
(defun erc-echo-notice-in-first-user-buffer (s parsed _buffer sender)
- "Echo a private notice in one of the buffers for which SENDER
-is a member. This function is designed to be added to either
+ "Echo a private notice in one of the buffers for which SENDER is a member.
+This function is designed to be added to either
`erc-echo-notice-hook' or `erc-echo-notice-always-hook', and
returns non-nil if there is at least one buffer for which the
sender is a member.
(defun erc-update-channel-member (channel nick new-nick
&optional add voice halfop op admin owner host login
full-name info update-message-time)
- "Update user and channel information for the user with
-nickname NICK in channel CHANNEL.
+ "Update user and channel for user with nickname NICK in channel CHANNEL.
See also: `erc-update-current-channel-member'."
(erc-with-buffer
;; (run-hooks 'erc-send-post-hook))))))
(defun erc-display-msg (line)
- "Display LINE as a message of the user to the current target at the
-current position."
+ "Display LINE as a message of the user to the current target at point."
(when erc-insert-this
(let ((insert-position (point)))
(insert (erc-format-my-nick))
:type 'boolean)
(defcustom erc-header-line-uses-help-echo-p t
- "Show the contents of the header line in the echo area or as a tooltip
-when you move point into the header line."
+ "Show header line in echo area or as a tooltip
+when point moves to the header line."
:group 'erc-mode-line-and-header
:type 'boolean)
(t (buffer-name (current-buffer))))))
(defun erc-format-away-status ()
- "Return a formatted `erc-mode-line-away-status-format'
-if `erc-away' is non-nil."
+ "Return a formatted `erc-mode-line-away-status-format' if `erc-away' is non-nil."
(let ((a (erc-away-time)))
(if a
(format-time-string erc-mode-line-away-status-format a)