aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorF. Jason Park2024-08-19 22:40:25 -0700
committerF. Jason Park2024-09-29 16:13:01 -0700
commit8f326e0ba23f88ee5ef25fb89f6c7cedbdbda89e (patch)
tree0778e67c3a5427c5e8b08fd39114d932c0ee9403
parentdd4c67907eb3084c6f55828c51bca1675a98376d (diff)
downloademacs-8f326e0ba23f88ee5ef25fb89f6c7cedbdbda89e.tar.gz
emacs-8f326e0ba23f88ee5ef25fb89f6c7cedbdbda89e.zip
; Rename internal variable in erc-fill
* 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)
-rw-r--r--lisp/erc/erc-fill.el4
-rw-r--r--lisp/erc/erc-truncate.el7
-rw-r--r--test/lisp/erc/erc-fill-tests.el2
-rw-r--r--test/lisp/erc/resources/erc-d/erc-d-tests.el8
-rw-r--r--test/lisp/erc/resources/erc-d/resources/basic.eld2
-rw-r--r--test/lisp/erc/resources/erc-scenarios-common.el2
6 files changed, 11 insertions, 14 deletions
diff --git a/lisp/erc/erc-fill.el b/lisp/erc/erc-fill.el
index c863d99a339..986314822ba 100644
--- a/lisp/erc/erc-fill.el
+++ b/lisp/erc/erc-fill.el
@@ -421,7 +421,7 @@ is 0, reset to value of `erc-fill-wrap-visual-keys'."
421(defvar erc-scrolltobottom-mode) 421(defvar erc-scrolltobottom-mode)
422(defvar erc-legacy-invisible-bounds-p) 422(defvar erc-legacy-invisible-bounds-p)
423 423
424(defvar erc--fill-wrap-scrolltobottom-exempt-p nil) 424(defvar erc-fill--wrap-scrolltobottom-exempt-p nil)
425 425
426(defun erc-fill--wrap-ensure-dependencies () 426(defun erc-fill--wrap-ensure-dependencies ()
427 (with-suppressed-warnings ((obsolete erc-legacy-invisible-bounds-p)) 427 (with-suppressed-warnings ((obsolete erc-legacy-invisible-bounds-p))
@@ -435,7 +435,7 @@ is 0, reset to value of `erc-fill-wrap-visual-keys'."
435 (unless erc-fill-mode 435 (unless erc-fill-mode
436 (push 'fill missing-deps) 436 (push 'fill missing-deps)
437 (erc-fill-mode +1)) 437 (erc-fill-mode +1))
438 (unless (or erc-scrolltobottom-mode erc--fill-wrap-scrolltobottom-exempt-p 438 (unless (or erc-scrolltobottom-mode erc-fill--wrap-scrolltobottom-exempt-p
439 (memq 'scrolltobottom erc-modules)) 439 (memq 'scrolltobottom erc-modules))
440 (push 'scrolltobottom missing-deps) 440 (push 'scrolltobottom missing-deps)
441 (erc-scrolltobottom-mode +1)) 441 (erc-scrolltobottom-mode +1))
diff --git a/lisp/erc/erc-truncate.el b/lisp/erc/erc-truncate.el
index 4b602074ebb..711a2988302 100644
--- a/lisp/erc/erc-truncate.el
+++ b/lisp/erc/erc-truncate.el
@@ -38,7 +38,7 @@
38(defcustom erc-max-buffer-size 30000 38(defcustom erc-max-buffer-size 30000
39 "Maximum size in chars of each ERC buffer. 39 "Maximum size in chars of each ERC buffer.
40Used only when auto-truncation is enabled. 40Used only when auto-truncation is enabled.
41\(see `erc-truncate-buffer' and `erc-insert-post-hook')." 41\(Also see `erc-truncate-buffer'.)"
42 :type 'integer) 42 :type 'integer)
43 43
44;;;###autoload(autoload 'erc-truncate-mode "erc-truncate" nil t) 44;;;###autoload(autoload 'erc-truncate-mode "erc-truncate" nil t)
@@ -92,10 +92,7 @@ present in `erc-modules'."
92 (error "erc-truncate-buffer-to-size: %S is not a buffer" buffer))) 92 (error "erc-truncate-buffer-to-size: %S is not a buffer" buffer)))
93 (when (> (buffer-size buffer) (+ size 512)) 93 (when (> (buffer-size buffer) (+ size 512))
94 (with-current-buffer buffer 94 (with-current-buffer buffer
95 ;; Note that when erc-insert-post-hook runs, the buffer is 95 ;; Though unneeded, widen anyway to preserve pre-5.5 behavior.
96 ;; narrowed to the new message. So do this delicate widening.
97 ;; I am not sure, I think this was not recommended behavior in
98 ;; Emacs 20.
99 (save-restriction 96 (save-restriction
100 (widen) 97 (widen)
101 (let ((end (- erc-insert-marker size))) 98 (let ((end (- erc-insert-marker size)))
diff --git a/test/lisp/erc/erc-fill-tests.el b/test/lisp/erc/erc-fill-tests.el
index f8bfc362085..b52a996f184 100644
--- a/test/lisp/erc/erc-fill-tests.el
+++ b/test/lisp/erc/erc-fill-tests.el
@@ -52,7 +52,7 @@
52 52
53(defun erc-fill-tests--wrap-populate (test) 53(defun erc-fill-tests--wrap-populate (test)
54 (let ((original-window-buffer (window-buffer (selected-window))) 54 (let ((original-window-buffer (window-buffer (selected-window)))
55 (erc--fill-wrap-scrolltobottom-exempt-p t) 55 (erc-fill--wrap-scrolltobottom-exempt-p t)
56 (erc-stamp--tz t) 56 (erc-stamp--tz t)
57 (erc-fill-function 'erc-fill-wrap) 57 (erc-fill-function 'erc-fill-wrap)
58 (pre-command-hook pre-command-hook) 58 (pre-command-hook pre-command-hook)
diff --git a/test/lisp/erc/resources/erc-d/erc-d-tests.el b/test/lisp/erc/resources/erc-d/erc-d-tests.el
index dd0d5f8cb87..63d304907ea 100644
--- a/test/lisp/erc/resources/erc-d/erc-d-tests.el
+++ b/test/lisp/erc/resources/erc-d/erc-d-tests.el
@@ -50,7 +50,7 @@
50 '(0 ":irc.example.org 422 tester :MOTD File is missing")))) 50 '(0 ":irc.example.org 422 tester :MOTD File is missing"))))
51 (should (equal (car (funcall reap)) '(mode-user 5 "MODE tester +i"))) 51 (should (equal (car (funcall reap)) '(mode-user 5 "MODE tester +i")))
52 (should (equal (funcall reap) 52 (should (equal (funcall reap)
53 '((mode-chan 1.2 "MODE #chan") 53 '((mode-chan 3.2 "MODE #chan")
54 (0.1 ":bob!~bob@example.org PRIVMSG #chan :hey")))) 54 (0.1 ":bob!~bob@example.org PRIVMSG #chan :hey"))))
55 ;; See `define-error' site for `iter-end-of-sequence' 55 ;; See `define-error' site for `iter-end-of-sequence'
56 (ert-info ("EOB detected") (should-not (erc-d-u--read-dialog exes)))) 56 (ert-info ("EOB detected") (should-not (erc-d-u--read-dialog exes))))
@@ -74,7 +74,7 @@
74 74
75 (should (equal (funcall user) '(user 0.2 "USER user 0 * :tester"))) 75 (should (equal (funcall user) '(user 0.2 "USER user 0 * :tester")))
76 (should (equal (funcall modu) '(mode-user 5 "MODE tester +i"))) 76 (should (equal (funcall modu) '(mode-user 5 "MODE tester +i")))
77 (should (equal (funcall modc) '(mode-chan 1.2 "MODE #chan"))) 77 (should (equal (funcall modc) '(mode-chan 3.2 "MODE #chan")))
78 78
79 (cl-loop repeat 8 do (funcall user)) ; skip a few 79 (cl-loop repeat 8 do (funcall user)) ; skip a few
80 (should (equal (funcall user) 80 (should (equal (funcall user)
@@ -147,7 +147,7 @@
147 (should (equal (car (funcall reap exes)) 147 (should (equal (car (funcall reap exes))
148 '(mode-user 15 "MODE tester +i"))) 148 '(mode-user 15 "MODE tester +i")))
149 (should (equal (car (funcall reap exes)) 149 (should (equal (car (funcall reap exes))
150 '(mode-chan 11.2 "MODE #chan"))) 150 '(mode-chan 13.2 "MODE #chan")))
151 (should-not (erc-d-u--read-dialog exes))) 151 (should-not (erc-d-u--read-dialog exes)))
152 152
153 (ert-info ("Rewrite for slowmo bounded") 153 (ert-info ("Rewrite for slowmo bounded")
@@ -176,7 +176,7 @@
176 (should (equal (car (funcall reap exes-custom)) 176 (should (equal (car (funcall reap exes-custom))
177 '(mode-user 10 "MODE tester +i"))) 177 '(mode-user 10 "MODE tester +i")))
178 (should (equal (car (funcall reap exes-custom)) 178 (should (equal (car (funcall reap exes-custom))
179 '(mode-chan 2.4 "MODE #chan"))) 179 '(mode-chan 6.4 "MODE #chan")))
180 (should-not (erc-d-u--read-dialog exes-custom)))) 180 (should-not (erc-d-u--read-dialog exes-custom))))
181 181
182 (should-not (get-buffer "basic.eld")) 182 (should-not (get-buffer "basic.eld"))
diff --git a/test/lisp/erc/resources/erc-d/resources/basic.eld b/test/lisp/erc/resources/erc-d/resources/basic.eld
index 80e46d9a279..bbc8713d699 100644
--- a/test/lisp/erc/resources/erc-d/resources/basic.eld
+++ b/test/lisp/erc/resources/erc-d/resources/basic.eld
@@ -27,5 +27,5 @@
27 (0 ":irc.example.org 366 alice #chan :End of NAMES list")) 27 (0 ":irc.example.org 366 alice #chan :End of NAMES list"))
28 28
29;; Some comment (to prevent regression) 29;; Some comment (to prevent regression)
30((mode-chan 1.2 "MODE #chan") 30((mode-chan 3.2 "MODE #chan")
31 (0.1 ":bob!~bob@example.org PRIVMSG #chan :hey")) 31 (0.1 ":bob!~bob@example.org PRIVMSG #chan :hey"))
diff --git a/test/lisp/erc/resources/erc-scenarios-common.el b/test/lisp/erc/resources/erc-scenarios-common.el
index 0dc82c98d5f..130b0aae109 100644
--- a/test/lisp/erc/resources/erc-scenarios-common.el
+++ b/test/lisp/erc/resources/erc-scenarios-common.el
@@ -150,7 +150,7 @@
150 (timer-list (copy-sequence timer-list)) 150 (timer-list (copy-sequence timer-list))
151 (timer-idle-list (copy-sequence timer-idle-list)) 151 (timer-idle-list (copy-sequence timer-idle-list))
152 (erc-auth-source-parameters-join-function nil) 152 (erc-auth-source-parameters-join-function nil)
153 (erc--fill-wrap-scrolltobottom-exempt-p t) 153 (erc-fill--wrap-scrolltobottom-exempt-p t)
154 (erc-autojoin-channels-alist nil) 154 (erc-autojoin-channels-alist nil)
155 (erc-server-auto-reconnect nil) 155 (erc-server-auto-reconnect nil)
156 (erc-after-connect nil) 156 (erc-after-connect nil)