* lisp/erc/erc-fill.el (erc--fill-wrap-scrolltobottom-exempt-p):
Rename to `erc-fill--wrap-scrolltobottom-exempt-p' so prefix matches
library and feature.
(erc-fill--wrap-ensure-dependencies): Update variable name.
* lisp/erc/erc-truncate.el (erc-max-buffer-size): Don't mention
`erc-insert-post-hook' in doc string because truncation now happens
elsewhere.
(erc-truncate-buffer-to-size): Update obsolete comment that describes
pre-5.5/Emacs 29 behavior.
* test/lisp/erc/erc-fill-tests.el (erc-fill-tests--wrap-populate):
Update variable name.
* test/lisp/erc/resources/erc-d/erc-d-tests.el
(erc-d-u--canned-load-dialog--basic)
(erc-d-u--canned-load-dialog--intermingled)
(erc-d-u--rewrite-for-slow-mo): Timeouts.
* test/lisp/erc/resources/erc-d/resources/basic.eld: Timeouts.
* test/lisp/erc/resources/erc-scenarios-common.el
(erc-scenarios-common--make-bindings): Use updated variable name.
(Bug#72736)
(cherry picked from commit
8f326e0ba23f88ee5ef25fb89f6c7cedbdbda89e)
(defvar erc-scrolltobottom-mode)
(defvar erc-legacy-invisible-bounds-p)
-(defvar erc--fill-wrap-scrolltobottom-exempt-p nil)
+(defvar erc-fill--wrap-scrolltobottom-exempt-p nil)
(defun erc-fill--wrap-ensure-dependencies ()
(with-suppressed-warnings ((obsolete erc-legacy-invisible-bounds-p))
(unless erc-fill-mode
(push 'fill missing-deps)
(erc-fill-mode +1))
- (unless (or erc-scrolltobottom-mode erc--fill-wrap-scrolltobottom-exempt-p
+ (unless (or erc-scrolltobottom-mode erc-fill--wrap-scrolltobottom-exempt-p
(memq 'scrolltobottom erc-modules))
(push 'scrolltobottom missing-deps)
(erc-scrolltobottom-mode +1))
(defcustom erc-max-buffer-size 30000
"Maximum size in chars of each ERC buffer.
Used only when auto-truncation is enabled.
-\(see `erc-truncate-buffer' and `erc-insert-post-hook')."
+\(Also see `erc-truncate-buffer'.)"
:type 'integer)
;;;###autoload(autoload 'erc-truncate-mode "erc-truncate" nil t)
(error "erc-truncate-buffer-to-size: %S is not a buffer" buffer)))
(when (> (buffer-size buffer) (+ size 512))
(with-current-buffer buffer
- ;; Note that when erc-insert-post-hook runs, the buffer is
- ;; narrowed to the new message. So do this delicate widening.
- ;; I am not sure, I think this was not recommended behavior in
- ;; Emacs 20.
+ ;; Though unneeded, widen anyway to preserve pre-5.5 behavior.
(save-restriction
(widen)
(let ((end (- erc-insert-marker size)))
(defun erc-fill-tests--wrap-populate (test)
(let ((original-window-buffer (window-buffer (selected-window)))
- (erc--fill-wrap-scrolltobottom-exempt-p t)
+ (erc-fill--wrap-scrolltobottom-exempt-p t)
(erc-stamp--tz t)
(erc-fill-function 'erc-fill-wrap)
(pre-command-hook pre-command-hook)
'(0 ":irc.example.org 422 tester :MOTD File is missing"))))
(should (equal (car (funcall reap)) '(mode-user 5 "MODE tester +i")))
(should (equal (funcall reap)
- '((mode-chan 1.2 "MODE #chan")
+ '((mode-chan 3.2 "MODE #chan")
(0.1 ":bob!~bob@example.org PRIVMSG #chan :hey"))))
;; See `define-error' site for `iter-end-of-sequence'
(ert-info ("EOB detected") (should-not (erc-d-u--read-dialog exes))))
(should (equal (funcall user) '(user 0.2 "USER user 0 * :tester")))
(should (equal (funcall modu) '(mode-user 5 "MODE tester +i")))
- (should (equal (funcall modc) '(mode-chan 1.2 "MODE #chan")))
+ (should (equal (funcall modc) '(mode-chan 3.2 "MODE #chan")))
(cl-loop repeat 8 do (funcall user)) ; skip a few
(should (equal (funcall user)
(should (equal (car (funcall reap exes))
'(mode-user 15 "MODE tester +i")))
(should (equal (car (funcall reap exes))
- '(mode-chan 11.2 "MODE #chan")))
+ '(mode-chan 13.2 "MODE #chan")))
(should-not (erc-d-u--read-dialog exes)))
(ert-info ("Rewrite for slowmo bounded")
(should (equal (car (funcall reap exes-custom))
'(mode-user 10 "MODE tester +i")))
(should (equal (car (funcall reap exes-custom))
- '(mode-chan 2.4 "MODE #chan")))
+ '(mode-chan 6.4 "MODE #chan")))
(should-not (erc-d-u--read-dialog exes-custom))))
(should-not (get-buffer "basic.eld"))
(0 ":irc.example.org 366 alice #chan :End of NAMES list"))
;; Some comment (to prevent regression)
-((mode-chan 1.2 "MODE #chan")
+((mode-chan 3.2 "MODE #chan")
(0.1 ":bob!~bob@example.org PRIVMSG #chan :hey"))
(timer-list (copy-sequence timer-list))
(timer-idle-list (copy-sequence timer-idle-list))
(erc-auth-source-parameters-join-function nil)
- (erc--fill-wrap-scrolltobottom-exempt-p t)
+ (erc-fill--wrap-scrolltobottom-exempt-p t)
(erc-autojoin-channels-alist nil)
(erc-server-auto-reconnect nil)
(erc-after-connect nil)