diff options
author | F. Jason Park <jp@neverwas.me> | 2023-01-23 20:48:24 -0800 |
---|---|---|
committer | F. Jason Park <jp@neverwas.me> | 2023-04-08 14:23:51 -0700 |
commit | d5435a0d822e95bfb18f3cdf4fac83611ec17972 (patch) | |
tree | 129b4603e4680b2b78355aac7a62057305000ca9 /lisp/emacs-lisp/lisp.el | |
parent | 05f6fdb9e7893329baff675bd31fb36ad64c756d (diff) | |
download | emacs-d5435a0d822e95bfb18f3cdf4fac83611ec17972.tar.gz emacs-d5435a0d822e95bfb18f3cdf4fac83611ec17972.tar.bz2 emacs-d5435a0d822e95bfb18f3cdf4fac83611ec17972.zip |
Refactor marker initialization in erc-open
* lisp/erc/erc.el (erc--initialize-markers): New helper to ensure
prompt and its associated markers are set up correctly.
(erc-open): When determining whether a session is a logical
continuation, leverage the work already performed by the
`erc-networks' library to that effect. Its verdicts are based on
network context and thus reliable even when a user dials anew from an
entry-point, which is not a simple reconnection because the user
expects a clean slate for everything except an existing buffer's
messages, meaning `erc--server-reconnecting' will be nil and
local-module state variables need resetting. Also remove the check
for `erc-reuse-buffers' and instead trust that `erc-get-buffer-create'
always does the right thing. Replace all code involving marker and
prompt setup by deferring to a new helper, `erc--initialize markers'.
* test/lisp/erc/erc-scenarios-base-local-module-modes.el: New file.
* test/lisp/erc/erc-scenarios-base-local-modules.el
(erc-scenarios-base-local-modules--mode-persistence): Move test to
separate file to help with parallel "-j" runs.
* test/lisp/erc/erc-tests.el (erc-tests--send-prep): Replace
redundant prompt-setup code.
(erc--initialize-markers): New test. (Bug#60936.)
Diffstat (limited to 'lisp/emacs-lisp/lisp.el')
0 files changed, 0 insertions, 0 deletions