]> 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)
committerEshel Yaron <me@eshelyaron.com>
Thu, 21 Dec 2023 20:53:56 +0000 (21:53 +0100)
commitd7890357b48386f3241ecce6e933a3ccf608566f
treedb49e23bc9256f798c845dc4884cab84d83e0d88
parent2457827283e5b688faeacaeafba3ae847b33db42
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)

(cherry picked from commit 0f058244ab7c4c2e5cb3fa5e4775c0f3cbe78e19)
lisp/erc/erc-track.el
test/lisp/erc/erc-track-tests.el