diff options
author | F. Jason Park <jp@neverwas.me> | 2023-10-10 00:32:21 -0700 |
---|---|---|
committer | F. Jason Park <jp@neverwas.me> | 2023-10-13 07:47:01 -0700 |
commit | 5e2be1e0ba64f030b8493d3e7b93b69caba3a254 (patch) | |
tree | 88d8db3745d405ff377fc4cc4db6d77b8af31c9c /test/lisp/erc/erc-scenarios-match.el | |
parent | c68dc7786fc808b1ff7deb32d9964ae860e26f1e (diff) | |
download | emacs-5e2be1e0ba64f030b8493d3e7b93b69caba3a254.tar.gz emacs-5e2be1e0ba64f030b8493d3e7b93b69caba3a254.tar.bz2 emacs-5e2be1e0ba64f030b8493d3e7b93b69caba3a254.zip |
Swap hook positions of erc-fill and erc-match-message
* etc/ERC-NEWS: Fix new order of reserved modify-hook members.
* lisp/erc/erc-fill.el: Increase depth of `erc-fill' in both modify
hooks from 40 to 60.
* lisp/erc/erc-match.el (erc-match-mode, erc-match-enable,
erc-match-disable): Use general module setup function
`erc-match--setup' for buffer-local modifications instead of calling
`erc-match--modify-invisibility-spec' directly. Add and remove new
post-modify hook `erc-match--on-insert-post'.
(erc-hide-fools): Use `erc--msg-props' for communicating to
post-processing step for applying invisible props instead of doing so
immediately.
(erc-match--on-insert-post): New function to apply module-specific
`invisible' props. Will likely be replaced by a general service to do
the same, perhaps provided by a future "erc-ignore"-like module.
(erc-match--modify-invisibility-spec, erc-match--setup): Rename former
to latter and only operate on current buffer.
* test/lisp/erc/erc-scenarios-match.el
(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
expected order of ERC-owned `invisible' prop members `match-fools' and
`timestamp'.
* test/lisp/erc/erc-tests.el (erc--essential-hook-ordering): Swap
expected order of `erc-fill' and `erc-add-timestamp' in both hooks.
(Bug#64301)
Diffstat (limited to 'test/lisp/erc/erc-scenarios-match.el')
-rw-r--r-- | test/lisp/erc/erc-scenarios-match.el | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/lisp/erc/erc-scenarios-match.el b/test/lisp/erc/erc-scenarios-match.el index 3da55572cf7..17f7649566e 100644 --- a/test/lisp/erc/erc-scenarios-match.el +++ b/test/lisp/erc/erc-scenarios-match.el @@ -134,7 +134,7 @@ ;; Leading stamp has combined `invisible' property value. (should (equal (get-text-property (pos-bol) 'invisible) - '(timestamp match-fools))) + '(match-fools timestamp))) ;; Message proper has the `invisible' property `match-fools'. (let ((msg-beg (next-single-property-change (pos-bol) 'invisible))) @@ -168,7 +168,7 @@ ;; Stamps have a combined `invisible' property value. (should (equal (get-text-property (1- end) 'invisible) - '(timestamp match-fools))) + '(match-fools timestamp))) ;; The final newline is hidden by `match', not `stamps' (with-suppressed-warnings ((obsolete erc-legacy-invisible-bounds-p)) @@ -184,7 +184,7 @@ ;; It ends just before the timestamp. (let ((msg-end (next-single-property-change (pos-bol) 'invisible))) (should (equal (get-text-property msg-end 'invisible) - '(timestamp match-fools))) + '(match-fools timestamp))) ;; Stamp's `invisible' property extends throughout the stamp ;; and ends before the trailing newline. @@ -230,7 +230,7 @@ ;; Stamps have a combined `invisible' property value. (should (equal (get-text-property (1- (pos-eol)) 'invisible) - '(timestamp match-fools))) + '(match-fools timestamp))) ;; The message proper has the `invisible' property `match-fools', ;; which starts at the preceding newline... @@ -239,7 +239,7 @@ ;; ... and ends just before the timestamp. (let ((msgend (next-single-property-change (1- (pos-bol)) 'invisible))) (should (equal (get-text-property msgend 'invisible) - '(timestamp match-fools))) + '(match-fools timestamp))) ;; The newline before `erc-insert-marker' is still visible. (should-not (get-text-property (pos-eol) 'invisible)) @@ -350,7 +350,7 @@ (let ((msgend (next-single-property-change (pos-bol) 'invisible))) ;; Stamp has a combined `invisible' property value. (should (equal (get-text-property msgend 'invisible) - '(timestamp match-fools))) + '(match-fools timestamp))) ;; Combined `invisible' property spans entire timestamp. (should (= (next-single-property-change msgend 'invisible) @@ -492,7 +492,7 @@ (let ((msgend (next-single-property-change (pos-bol) 'invisible))) ;; Stamp has a combined `invisible' property value. (should (equal (get-text-property msgend 'invisible) - '(timestamp match-fools))) + '(match-fools timestamp))) ;; Combined `invisible' property spans entire timestamp. (should (= (next-single-property-change msgend 'invisible) |