From 45180df71fc636d086ff87d70d377263688a133f Mon Sep 17 00:00:00 2001 From: "F. Jason Park" Date: Sun, 24 Nov 2024 15:30:02 -0800 Subject: [PATCH] Clear buffer-undo-list after sending input in ERC * lisp/erc/erc.el (erc-send-current-line): Set `buffer-undo-list' to nil because it should only record editing changes in the prompt area, which has just been cleared. ERC did this via `erc-display-prompt' prior to 5.6, but it now leaves the prompt alone by default. (Bug#74518) --- lisp/erc/erc.el | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 7028d0a68cc..c6978728dd6 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -8200,10 +8200,9 @@ erc-send-current-line ;; Fix the buffer if the command didn't kill it (when (buffer-live-p old-buf) (with-current-buffer old-buf - (save-restriction - (widen) - (let ((buffer-modified (buffer-modified-p))) - (set-buffer-modified-p buffer-modified)))))) + (setq buffer-undo-list nil) + ;; `set-buffer-modified-p' used to do this here. + (force-mode-line-update)))) ;; Only when last hook has been run... (run-hook-with-args 'erc-send-completed-hook str))) -- 2.47.0