* bug#23700: Patch to fix erc-kill-channel sending command to server when no connection
@ 2016-06-05 17:47 Fran Litterio
2017-04-18 0:32 ` Glenn Morris
0 siblings, 1 reply; 2+ messages in thread
From: Fran Litterio @ 2016-06-05 17:47 UTC (permalink / raw)
To: 23700
In the latest Emacs sources, function erc-default-target returns
nil when ERC is no longer connected to the server for the current
ERC buffer. This can cause erc-kill-channel to try to send a
command to the disconnected server when a channel buffer is killed.
This patch fixes that.
--
Fran Litterio
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index 8501e2c..da5edf1 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -6735,9 +6735,10 @@ This function should be on `erc-kill-server-hook'."
This function should be on `erc-kill-channel-hook'."
(when (erc-server-process-alive)
(let ((tgt (erc-default-target)))
- (erc-server-send (format "PART %s :%s" tgt
- (funcall erc-part-reason nil))
- nil tgt))))
+ (if tgt
+ (erc-server-send (format "PART %s :%s" tgt
+ (funcall erc-part-reason nil))
+ nil tgt)))))
;;; Dealing with `erc-parsed'
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#23700: Patch to fix erc-kill-channel sending command to server when no connection
2016-06-05 17:47 bug#23700: Patch to fix erc-kill-channel sending command to server when no connection Fran Litterio
@ 2017-04-18 0:32 ` Glenn Morris
0 siblings, 0 replies; 2+ messages in thread
From: Glenn Morris @ 2017-04-18 0:32 UTC (permalink / raw)
To: 23700-done
Version: 26.1
Thanks, applied as 4ad6be6.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-04-18 0:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-05 17:47 bug#23700: Patch to fix erc-kill-channel sending command to server when no connection Fran Litterio
2017-04-18 0:32 ` Glenn Morris
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).