From 1e1378699c9cc7f2de0fd679149379522bcc3c6d Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Tue, 14 Sep 2021 20:32:46 +0200 Subject: [PATCH] Restore rcirc-target if possible * rcirc.el (rcirc-process-message): Extract target from buffer name --- lisp/net/rcirc.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 579a350c6a1..5537ddca108 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -1620,6 +1620,11 @@ The argument JUSTIFY is passed on to `fill-region'." (defun rcirc-process-message (line) "Process LINE as a message to be sent." + (when (and (null rcirc-target) + (string-match + (rx bos (group (+? nonl)) "@" (+ nonl) eos) + (buffer-name))) + (setq rcirc-target (match-string 1 (buffer-name)))) (if (not rcirc-target) (message "Not joined (no target)") (delete-region rcirc-prompt-end-marker (point)) -- 2.39.5