From 01ab5bd44db814e4520306b85a57ad0e01140674 Mon Sep 17 00:00:00 2001 From: Emanuel Berg Date: Wed, 24 Jan 2024 02:31:04 +0100 Subject: [PATCH 3/3] Remove the logical connectivity test Test already there in another form. * lisp/erc/erc.el (erc-cmd-AMSG, erc-cmd-GMSG, erc-cmd-AME, erc-cmd-GME): removed from these functions. (bug#68401) --- lisp/erc/erc.el | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index e89733e7871..e375145e825 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -4004,17 +4004,12 @@ erc--split-string-shell-cmd ;; Input commands handlers ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(defun erc--connected-and-joined-p () - (and (erc--current-buffer-joined-p) - erc-server-connected)) - (defun erc-cmd-GMSG (line) "Send LINE to all channels on all networks you are on." (setq line (string-remove-prefix " " line)) (erc-with-all-buffers-of-server nil (lambda () (erc-channel-p (erc-default-target))) - (when (erc--connected-and-joined-p) - (erc-send-message line)))) + (erc-send-message line))) (put 'erc-cmd-GMSG 'do-not-parse-args t) (defun erc-cmd-AMSG (line) @@ -4024,24 +4019,21 @@ erc-cmd-AMSG (setq line (string-remove-prefix " " line)) (erc-with-all-buffers-of-server erc-server-process (lambda () (erc-channel-p (erc-default-target))) - (when (erc--connected-and-joined-p) - (erc-send-message line)))) + (erc-send-message line))) (put 'erc-cmd-AMSG 'do-not-parse-args t) (defun erc-cmd-GME (line) "Send LINE as an action to all channels on all networks you are on." (erc-with-all-buffers-of-server nil (lambda () (erc-channel-p (erc-default-target))) - (when (erc--connected-and-joined-p) - (erc-cmd-ME line)))) + (erc-cmd-ME line))) (put 'erc-cmd-GME 'do-not-parse-args t) (defun erc-cmd-AME (line) "Send LINE as an action to all channels on the current network." (erc-with-all-buffers-of-server erc-server-process (lambda () (erc-channel-p (erc-default-target))) - (when (erc--connected-and-joined-p) - (erc-cmd-ME line)))) + (erc-cmd-ME line))) (put 'erc-cmd-AME 'do-not-parse-args t) (defun erc-cmd-SAY (line) -- 2.39.2