Function: erc--format-user-modes

erc--format-user-modes is a byte-compiled function defined in erc.el.gz.

Signature

(erc--format-user-modes)

Documentation

Return server's user modes as a string.

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc.el.gz
;; If adding more of these functions, should factor out commonalities.
;; As of ERC 5.6, this is identical to the away variant aside from
;; the var names and `eq', which isn't important.
(defun erc--format-user-modes ()
  "Return server's user modes as a string."
  (and-let* ((indicator (erc-with-server-buffer
                          (or erc--user-modes-indicator
                              (setq erc--user-modes-indicator (list "")))))
             (newcar (erc--user-modes 'string)))
    (let ((dispp (not erc--inhibit-prompt-display-property-p)))
      (unless (string= newcar (car indicator))
        (erc--refresh-prompt-continue (and dispp 'hooks-only-p))
        (setcar indicator newcar))
      (if dispp
          (propertize "(user-modes?)" 'display indicator)
        newcar))))