Function: doom-modeline-shorten-irc

doom-modeline-shorten-irc is a natively compiled function defined in doom-modeline-segments.el.

Signature

(doom-modeline-shorten-irc NAME)

Documentation

Shorten IRC buffer name according to IRC mode.

Calls the mode specific function to return the shortened version of NAME if applicable:
- Circe: tracking-shorten
- ERC: erc-track-shorten-function
- rcirc: rcirc-shorten-buffer-name

The specific function will decide how to stylize the buffer name, read the individual functions documentation for more.

Source Code

;; Defined in /nix/store/1lcicrdd2r4b8rkc91nnn74ymk1jl6yd-emacs-packages-deps/share/emacs/site-lisp/elpa/doom-modeline-20260928.1632/doom-modeline-segments.el
;;
;; IRC notifications
;;

(defun doom-modeline-shorten-irc (name)
  "Shorten IRC buffer `name' according to IRC mode.

Calls the mode specific function to return the shortened
version of `NAME' if applicable:
- Circe: `tracking-shorten'
- ERC: `erc-track-shorten-function'
- rcirc: `rcirc-shorten-buffer-name'

The specific function will decide how to stylize the buffer name,
read the individual functions documentation for more."
  (or (and (fboundp 'tracking-shorten)
           (car (tracking-shorten (list name))))
      (and (boundp 'erc-track-shorten-function)
           (functionp erc-track-shorten-function)
	       (car (funcall erc-track-shorten-function (list name))))
      (and (fboundp 'rcirc-short-buffer-name)
           (rcirc-short-buffer-name name))
      name))