Paste number 10527: displayed channel-name abbreviations for rcirc

Paste number 10527: displayed channel-name abbreviations for rcirc
Pasted by: ayrnieu
When:12 years, 2 months ago
Share:Tweet this! | http://paste.lisp.org/+84F
Channel:#emacs
Paste contents:
Raw Source | XML | Display As
;;; added to rcirc.el
(defvar rcirc-abbreviated-channels nil
  "Alist of channels to specially abbreviate in the modeline.
Each element looks like (CHANNEL . ABBREVIATION).
E.g., ((\"#vectorprogramming\" . \"#vp\")).")

;;; modified in rcirc.el
(defun rcirc-short-buffer-name (buffer)
  "Return a short name for BUFFER to use in the modeline indicator."
  (with-current-buffer buffer
    (let ((bn (or rcirc-target (process-name rcirc-process))))
      (or (cdr (assoc bn rcirc-abbreviated-channels)) bn))))

;;; added to ~/.emacs
(add-to-list 'rcirc-abbreviated-channels '("#vectorprogramming" . "#vp"))
(add-to-list 'rcirc-abbreviated-channels '("#opensolaris" . "#os"))

This paste has no annotations.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.