1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-25 15:00:45 -08:00
emacs/test/lisp/erc
F. Jason Park af547c4bbe Improve ERC's internal invisibility API
* etc/ERC-NEWS: Mention that line endings have moved from the end to
the beginning of hidden messages.
* lisp/erc/erc-fill.el (erc-fill--wrap-ensure-dependencies): Warn when
users have `erc-legacy-invisible-bounds-p' enabled, and force it to
its default value of nil in the current buffer.
(erc-fill-wrap-mode, erc-fill-wrap-enable): Move business involving
compat variable for enabling legacy hidden-message behavior to helper.
* lisp/erc/erc-match.el (erc-match--hide-fools-offset-bounds): Move
internal variable from to main library file and rename to
`erc-legacy-invisible-bounds-p'.  Also make obsolete and flip
semantics so a non-nil value enables the traditional behavior.
(erc-match--hide-message): Move to main library file and rename to
`erc--hide-message'.  Add a property-value parameter instead of
hard-coding to `erc-match'.  Also, condition behavior on renamed
compatibility flag `erc-legacy-invisible-bounds-p'.
(erc-hide-fools): Call `erc--hide-message' with own value for
`invisible' property specifically for fools.  That is, use
`match-fools' rather than `erc-match' or `erc-match-fools' to save
room when visually inspecting.  This retains the module name as a
prefix to hopefully minimize collisions with invisibility spec members
owned by non-ERC minor modes.  The `timestamp' spec member owned by
erc-stamp likewise lacks a namespace prefix, but its feature/group
affiliation is self-evident.
(erc-match--modify-invisibility-spec): Use toggle command
non-interactively for adding and removing invisibility spec member.
(erc-match-toggle-hidden-fools): Add explicit override argument and
defer to general helper for actually modifying spec.
(erc-match--toggle-hidden): New helper for toggling invisibility
spec.
* lisp/erc/erc.el (erc--merge-prop): If new value is a list, prepend
onto existing.  Add note about possible space optimization.
(erc-legacy-invisible-bounds-p): New obsolete compat variable to
enable traditional pre-5.6 invisibility interval on hidden messages.
Replaces `erc-match--hide-fools-offset-bounds-p' but has an inverted
meaning.  The new default value of nil means invisibility covers a
shifted interval consisting of the message body plus the line ending
immediately preceding it.
(erc--hide-message): New function, formerly `erc-match--hide-message'
from erc-match.el introduced in ERC 5.6.
* test/lisp/erc/erc-scenarios-match.el:
(erc-scenarios-match--invisible-stamp): Fix comment and use API
function in interactive convenience setup.
(erc-scenarios-match--find-bol): New test helper.
(erc-scenarios-match--find-eol): Fix bug affecting interactive use.
(erc-scenarios-match--stamp-left-fools-invisible,
erc-scenarios-match--stamp-right-fools-invisible,
erc-scenarios-match--stamp-right-invisible-fill-wrap,
erc-scenarios-match--stamp-both-invisible-fill-static): Update
`invisible' property from `erc-match' to `match-fools'.
(erc-scenarios-match--stamp-right-fools-invisible,
erc-scenarios-match--stamp-both-invisible-fill-static): Move test
body to function of same name for use in multiple cases.
(erc-scenarios-match--stamp-right-fools-invisible--nooffset,
erc-scenarios-match--stamp-both-invisible-fill-static--nooffset): New
test variants asserting proper hiding with old pre-5.6 invisibility
interval.
* test/lisp/erc/erc-tests.el (erc-tests--equal-including-properties):
Relocate macro higher in same file.
(erc--merge-prop): New test.  (Bug#64301)
2023-07-22 07:33:07 -07:00
..
resources Make erc-fill-wrap work with left-sided stamps 2023-07-22 07:33:07 -07:00
erc-button-tests.el Optionally combine faces in erc-display-message 2023-07-13 18:45:31 -07:00
erc-dcc-tests.el Fix command-line parsing regression in erc-cmd-DCC 2023-07-13 18:45:31 -07:00
erc-fill-tests.el Make erc-fill-wrap work with left-sided stamps 2023-07-22 07:33:07 -07:00
erc-goodies-tests.el Decouple keep-place-indicator from global ERC module 2023-07-13 18:45:31 -07:00
erc-join-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-match-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-networks-tests.el Deprecate erc-server-alist and erc-server-select 2023-07-13 18:45:31 -07:00
erc-nicks-tests.el Add module for colorizing nicknames to ERC 2023-07-13 18:45:31 -07:00
erc-sasl-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-scenarios-auth-source.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-scenarios-base-association-nick.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-scenarios-base-association-query.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-scenarios-base-association-samenet.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-scenarios-base-association.el Remove obsolete server buffers on MOTD in erc-track 2023-01-10 06:34:01 -08:00
erc-scenarios-base-attach.el Revive option erc-query-on-unjoined-chan-privmsg 2023-05-05 17:18:01 -07:00
erc-scenarios-base-auto-recon.el Add probing erc-server-reconnect-function variant 2023-04-08 14:23:50 -07:00
erc-scenarios-base-buffer-display.el Allow custom display-buffer actions in ERC 2023-07-13 18:45:31 -07:00
erc-scenarios-base-compat-rename-bouncer.el ; Fix filename mismatches in prop lines of ERC tests 2023-01-24 20:15:18 -08:00
erc-scenarios-base-local-module-modes.el Refactor marker initialization in erc-open 2023-04-08 14:23:51 -07:00
erc-scenarios-base-local-modules.el Refactor marker initialization in erc-open 2023-04-08 14:23:51 -07:00
erc-scenarios-base-misc-regressions.el Add MOTD command to ERC 2023-04-08 14:23:50 -07:00
erc-scenarios-base-netid-bouncer-id.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-scenarios-base-netid-bouncer-recon-base.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-scenarios-base-netid-bouncer-recon-both.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-scenarios-base-netid-bouncer-recon-id.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-scenarios-base-netid-bouncer.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-scenarios-base-netid-samenet.el ; Fix filename mismatches in prop lines of ERC tests 2023-01-24 20:15:18 -08:00
erc-scenarios-base-reconnect.el Move ERC's buffer-display tests to separate file 2023-05-05 17:18:01 -07:00
erc-scenarios-base-renick.el Revert "Add hook to regain nickname in ERC" 2023-06-11 20:24:07 -07:00
erc-scenarios-base-reuse-buffers.el ; Remove failing erc-reuse-buffers test 2023-02-14 08:25:00 -08:00
erc-scenarios-base-split-line.el Redo line splitting for outgoing messages in ERC 2023-05-05 17:18:01 -07:00
erc-scenarios-base-unstable.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-scenarios-base-upstream-recon-soju.el ; Fix filename mismatches in prop lines of ERC tests 2023-01-24 20:15:18 -08:00
erc-scenarios-base-upstream-recon-znc.el ; Fix filename mismatches in prop lines of ERC tests 2023-01-24 20:15:18 -08:00
erc-scenarios-internal.el ; Prevent ERC-induced false positive in JUnit report 2023-02-15 08:34:04 -08:00
erc-scenarios-join-auth-source.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-scenarios-join-display-context.el Allow custom display-buffer actions in ERC 2023-07-13 18:45:31 -07:00
erc-scenarios-join-netid-newcmd-id.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-scenarios-join-netid-newcmd.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-scenarios-join-netid-recon-id.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-scenarios-join-netid-recon.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-scenarios-log.el Preserve prompt in erc-cmd-CLEAR 2023-05-29 21:46:23 -07:00
erc-scenarios-match.el Improve ERC's internal invisibility API 2023-07-22 07:33:07 -07:00
erc-scenarios-misc.el Ignore killed buffers when switching in erc-track 2023-04-08 14:23:51 -07:00
erc-scenarios-sasl.el Split overlong outgoing messages in erc-sasl 2023-04-08 14:23:50 -07:00
erc-scenarios-services-misc.el Redo erc-nickname-in-use-functions as a local module 2023-07-01 07:21:30 -07:00
erc-scenarios-status-sidebar.el Add erc-status-sidebar integration to erc-speedbar 2023-07-13 18:45:31 -07:00
erc-services-tests.el Make auth-source erc-services tests more readable 2023-04-08 14:23:51 -07:00
erc-stamp-tests.el Make erc-fill-wrap work with left-sided stamps 2023-07-22 07:33:07 -07:00
erc-tests.el Improve ERC's internal invisibility API 2023-07-22 07:33:07 -07:00
erc-track-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00