Function: erc--get-eq-comparable-cmd

erc--get-eq-comparable-cmd is a byte-compiled function defined in erc.el.gz.

Signature

(erc--get-eq-comparable-cmd COMMAND)

Documentation

Return a symbol or a fixnum representing a message's COMMAND.

See also erc-message-type.

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc.el.gz
(defun erc--get-eq-comparable-cmd (command)
  "Return a symbol or a fixnum representing a message's COMMAND.
See also `erc-message-type'."
  ;; IRC numerics are three-digit numbers, possibly with leading 0s.
  ;; To invert: (if (numberp o) (format "%03d" o) (symbol-name o))
  (if-let ((n (string-to-number command)) ((zerop n))) (intern command) n))