]> git.eshelyaron.com Git - emacs.git/commit
Use correct buffer for local-module vars in erc-open
authorF. Jason Park <jp@neverwas.me>
Tue, 17 Jan 2023 07:05:16 +0000 (23:05 -0800)
committerF. Jason Park <jp@neverwas.me>
Tue, 17 Jan 2023 14:09:08 +0000 (06:09 -0800)
commit7b8322f6285702faf5da0824b9b195619da9c698
treeed7233ebbc9c91cd265528d8175a700e5631e705
parent7b13422298a2613c506d41f52fa0c0ca1588f870
Use correct buffer for local-module vars in erc-open

* lisp/erc/erc.el (erc--target-priors): New internal variable to do
for target buffers what `erc--server-reconnecting' does for server
buffers.
(erc-open): Source the state of a local module's mode variable from
its actual buffer rather than its server buffer.  Additionally, make
all local variables from a prior session available to
module-activation functions and `erc-mode' hooks, even when
`erc-reuse-buffers' is nil.  This bug arrived with the introduction of
"local-modules" (bug#57955).

* test/lisp/erc/erc-scenarios-base-local-modules.el
(erc-scenarios-base-local-modules--toggle-helpers): Remove useless
`with-current-buffer'.
(erc-scenarios-base-local-modules--local-var, erc--phony-sblm--enable,
erc--phony-sblm--disable, erc--phony-sblm--mode): Add fake local
module and data var for test scenario.
(erc-scenarios-base-local-modules--var-persistence) Add slightly hacky
test case with promise to improve later when splitting the file.
lisp/erc/erc.el
test/lisp/erc/erc-scenarios-base-local-modules.el