bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#4048: 23.1; erc-server-reconnect-attempts does not work


From: Lars Ingebrigtsen
Subject: bug#4048: 23.1; erc-server-reconnect-attempts does not work
Date: Sun, 27 Dec 2015 23:37:21 +0100
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.1.50 (gnu/linux)

Vivek Dasmohapatra <vivek@etla.org> writes:

> Does this patch make the problem go away? It seems to work here.
>
> The problem was that erc-mode was killing all local variables, even when
> the mode was already erc-mode : The patch makes it preserve the
> reconnection count in that case, which seems to have the desired effect
> without adversely affecting anything else.
>
> [ Stomping on the route didn't work for me as the existing connection was
>   grandfathered in by the kernel: Installing a local ircd and shutting it
>   down behind the client's back worked nicely though. ]

IThis patch no longer applies:

diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -1445,7 +1445,10 @@ Special commands:
 \\{erc-mode-map}
 
 Turning on `erc-mode' runs the hook `erc-mode-hook'."
-  (kill-all-local-variables)
+  (let ((recon-count erc-server-reconnect-count) (old-mode major-mode))
+    (kill-all-local-variables)
+    (if (and (eq old-mode 'erc-mode) (integerp recon-count) (< 0 recon-count)) 
+       (setq erc-server-reconnect-count recon-count)))
   (use-local-map erc-mode-map)
   (setq mode-name "ERC"
        major-mode 'erc-mode

Is this still a problem in erc in Emacs 25?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]