branch: externals/detached commit cf229d6d6be3f7fd6454a7db9a9f6397b6a8ffed Author: Niklas Eklund <niklas.ekl...@posteo.net> Commit: Niklas Eklund <niklas.ekl...@posteo.net>
Let-bind kill-ring before killing input We were unintentionally writing to the kill-ring. --- detached-compile.el | 3 ++- detached-eshell.el | 3 ++- detached-shell.el | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/detached-compile.el b/detached-compile.el index a924275fe1..bc8ca0b1b7 100644 --- a/detached-compile.el +++ b/detached-compile.el @@ -123,7 +123,8 @@ Optionally EDIT-COMMAND." (defun detached-compile--replace-modesetter () "Replace the modsetter inserted by `compilation-start'." (save-excursion - (let ((buffer-read-only nil) + (let ((kill-ring nil) + (buffer-read-only nil) (regexp (rx (regexp "^dtach ") (or "-c" "-a") (regexp ".*\.socket.*$")))) (goto-char (point-min)) (when (re-search-forward regexp nil t) diff --git a/detached-eshell.el b/detached-eshell.el index fc8cdc1903..e78dea731b 100644 --- a/detached-eshell.el +++ b/detached-eshell.el @@ -86,7 +86,8 @@ If prefix-argument directly DETACH from the session." (input (detached-dtach-command session t)) ((symbol-function #'eshell-add-to-history) #'ignore)) - (eshell-kill-input) + (let ((kill-ring nil)) + (eshell-kill-input)) ;; Hide the input from the user (let ((begin (point)) (end)) diff --git a/detached-shell.el b/detached-shell.el index 089f7c1bac..9fef96ef9a 100644 --- a/detached-shell.el +++ b/detached-shell.el @@ -81,7 +81,8 @@ cluttering the comint-history with dtach commands." (comint-input-sender #'detached-shell--attach-input-sender) ((symbol-function 'comint-add-to-input-history) (lambda (_) t))) (setq detached--buffer-session session) - (comint-kill-input) + (let ((kill-ring nil)) + (comint-kill-input)) (insert "[attached]") (comint-send-input)) (detached-open-session session))))