From: Philip Kaludercic Date: Tue, 14 Sep 2021 18:32:46 +0000 (+0200) Subject: Restore rcirc-target if possible X-Git-Tag: emacs-28.0.90~948^2~2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1e1378699c9cc7f2de0fd679149379522bcc3c6d;p=emacs.git Restore rcirc-target if possible * rcirc.el (rcirc-process-message): Extract target from buffer name --- 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))