(when none-alive-func (funcall none-alive-func)))))
(defun erc-autoaway-some-open-server-buffer ()
- "Return some ERC server buffer if its connection is alive and the
-user is not away.
+ "Return some ERC server buffer if its connection is alive and user is not away.
If none is found, return nil."
(car (erc-buffer-list (lambda ()
(and (erc-open-server-buffer-p)
(defun erc-forward-word ()
"Move forward one word, ignoring any subword settings.
-If no subword-mode is active, then this is (forward-word)."
+If no `subword-mode' is active, then this is (forward-word)."
(skip-syntax-forward "^w")
(> (skip-syntax-forward "w") 0))
(defun erc-bounds-of-word-at-point ()
"Return the bounds of word at point, or nil if we're not at a word.
-If no subword-mode is active, then this is
+If no `subword-mode' is active, then this is
\(bounds-of-thing-at-point 'word)."
(if (or (erc-word-at-arg-p (point))
(erc-word-at-arg-p (1- (point))))
All values of the list must be uppercase strings.")
(defvar erc-dcc-list nil
- "List of DCC connections. Looks like:
+ "List of DCC connections.
+Looks like:
((:nick \"nick!user@host\" :type GET :peer proc
:parent proc :size size :file file)
(:nick \"nick!user@host\" :type CHAT :peer proc :parent proc)
;;; Misc macros and utility functions
(defun erc-dcc-member (&rest args)
- "Return the first matching entry in `erc-dcc-list' which satisfies the
-constraints given as a plist in ARGS. Returns nil on no match.
+ "Return first matching entry in `erc-dcc-list' satisfying constraints in plist ARGS.
+
+Return nil on no match.
The property :nick is treated specially, if it contains a `!' character,
it is treated as a nick!user@host string, and compared with the :nick property
result))
(defun erc-pack-int (value)
- "Convert an integer into a packed string in network byte order,
-which is big-endian."
+ "Convert integer into a packed string in network byte order, which is big-endian."
;; make sure value is not negative
(when (< value 0)
(error "ERC-DCC (erc-pack-int): packet size is negative"))
:type 'alist)
(defun erc-canonicalize-server-name (server)
- "Return the canonical network name for SERVER if any,
-otherwise `erc-server-announced-name'. SERVER is matched against
-`erc-common-server-suffixes'."
+ "Return canonical network name for SERVER or `erc-server-announced-name'.
+SERVER is matched against `erc-common-server-suffixes'."
(when server
(or (cdar (cl-remove-if-not
(lambda (net) (string-match (car net) server))