]> git.eshelyaron.com Git - emacs.git/commit
Use marker for max pos in erc--traverse-inserted
authorF. Jason Park <jp@neverwas.me>
Sat, 21 Oct 2023 20:53:46 +0000 (13:53 -0700)
committerF. Jason Park <jp@neverwas.me>
Fri, 27 Oct 2023 20:09:13 +0000 (13:09 -0700)
commit5c4a9b73031f1607e4f793c5c0ef27004cc258db
tree1268d980399951ac0dc626fa599867fead58c60b
parenta4ba236e56fd71e30b9a729edaf379c0638e809a
Use marker for max pos in erc--traverse-inserted

* lisp/erc/erc-stamp.el (erc-stamp--propertize-left-date-stamp): Run
`erc-stamp--insert-date-hook' separately here instead of via
`erc-insert-modify-hook'.
(erc-stamp--insert-date-stamp-as-phony-message): Don't include value
of `erc-stamp--insert-date-hook' in let-bound `erc-insert-modify-hook'
because its members can run twice if buffer-local.  Remove
`erc-send-modify-hook' because it only runs via `erc-display-msg'.
Shadow "pre" and "done" hooks because they don't expect to run in a
narrowed buffer.  Call getter for `erc-stamp--current-time'.
(erc-stamp--lr-date-on-pre-modify,
erc-insert-timestamp-left-and-right): Use function form of
`erc-stamp--current-time' for determining current time stamp.
* lisp/erc/erc.el (erc--get-inserted-msg-bounds): Fix off-by-one like
thinko.
(erc--traverse-inserted): Create temporary marker when END is a buffer
position so that insertions and deletions are accounted for in
the terminating condition.
(erc--delete-inserted-message): New function.
* test/lisp/erc/erc-tests.el (erc--delete-inserted-message): New test.
(erc--update-modules/unknown): Improve readability slightly.
* test/lisp/erc/resources/erc-d/erc-d-t.el (erc-d-t-make-expecter):
Indicate assertion flavor in error message.  (Bug#60936)
lisp/erc/erc-stamp.el
lisp/erc/erc.el
test/lisp/erc/erc-tests.el
test/lisp/erc/resources/erc-d/erc-d-t.el