]> git.eshelyaron.com Git - emacs.git/commit
Cache shortened channel names in erc-track
authorF. Jason Park <jp@neverwas.me>
Mon, 13 Jun 2022 07:26:22 +0000 (00:26 -0700)
committerF. Jason Park <jp@neverwas.me>
Mon, 18 Dec 2023 04:17:55 +0000 (20:17 -0800)
commit0f058244ab7c4c2e5cb3fa5e4775c0f3cbe78e19
treeaef811843bf204c8f440e1d9d6be73fac31dbef5
parent9d889af0d68a73aa45d112cbad9577f897b6e3c3
Cache shortened channel names in erc-track

* lisp/erc/erc-track.el (erc-track--shortened-names): New variable to
stash both the latest inputs and most recent result of
`erc-track-shorten-function'.
(erc-track--shortened-names-current-hash,
erc-track--shortened-names-set, erc-track--shortened-names-get): New
pair of generalized-variable functions and helper variable for
accessing and mutating `erc-track--shorten-prefixes'.
(erc-modified-channels-display): Avoid redundant calls to
`erc-track-shorten-function'.  Mainly for use during batch processing.
* test/lisp/erc/erc-track-tests.el (erc-track--shortened-names): New
test.  (Bug#67767)
lisp/erc/erc-track.el
test/lisp/erc/erc-track-tests.el