[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Erc-commit] [commit][master] Move definition of a function to get rid o
From: |
mwolson |
Subject: |
[Erc-commit] [commit][master] Move definition of a function to get rid of byte-compiler warning |
Date: |
Wed, 05 Dec 2007 00:20:08 -0500 |
commit 356094a638d0a30d1d80beca983e38eb7ddfc527
Author: Michael W. Olson <address@hidden>
Date: Tue Dec 4 19:50:14 2007 -0500
Move definition of a function to get rid of byte-compiler warning
diff --git a/ChangeLog b/ChangeLog
index cf96f33..b790e6e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-12-01 Glenn Morris <address@hidden>
+
+ * erc-backend.el (erc-server-send-ping): Move after definition of
+ erc-server-send.
+
2007-11-29 Giorgos Keramidas <address@hidden> (tiny change)
* erc-backend.el, erc.el:
diff --git a/erc-backend.el b/erc-backend.el
index 338696f..c0f4205 100644
--- a/erc-backend.el
+++ b/erc-backend.el
@@ -461,27 +461,6 @@ Currently this is called by `erc-send-input'."
(upcase-word 1)
(buffer-string)))
-(defun erc-server-send-ping (buf)
- "Send a ping to the IRC server buffer in BUF.
-Additionally, detect whether the IRC process has hung."
- (if (buffer-live-p buf)
- (with-current-buffer buf
- (if (and erc-server-send-ping-timeout
- (>
- (erc-time-diff (erc-current-time)
- erc-server-last-received-time)
- erc-server-send-ping-timeout))
- (progn
- ;; if the process is hung, kill it
- (setq erc-server-timed-out t)
- (delete-process erc-server-process))
- (erc-server-send (format "PING %.0f" (erc-current-time)))))
- ;; remove timer if the server buffer has been killed
- (let ((timer (assq buf erc-server-ping-timer-alist)))
- (when timer
- (erc-cancel-timer (cdr timer))
- (setcdr timer nil)))))
-
(defun erc-server-setup-periodical-ping (buffer)
"Set up a timer to periodically ping the current server.
The current buffer is given by BUFFER."
@@ -775,6 +754,27 @@ protection algorithm."
(message "ERC: No process running")
nil)))
+(defun erc-server-send-ping (buf)
+ "Send a ping to the IRC server buffer in BUF.
+Additionally, detect whether the IRC process has hung."
+ (if (buffer-live-p buf)
+ (with-current-buffer buf
+ (if (and erc-server-send-ping-timeout
+ (>
+ (erc-time-diff (erc-current-time)
+ erc-server-last-received-time)
+ erc-server-send-ping-timeout))
+ (progn
+ ;; if the process is hung, kill it
+ (setq erc-server-timed-out t)
+ (delete-process erc-server-process))
+ (erc-server-send (format "PING %.0f" (erc-current-time)))))
+ ;; remove timer if the server buffer has been killed
+ (let ((timer (assq buf erc-server-ping-timer-alist)))
+ (when timer
+ (erc-cancel-timer (cdr timer))
+ (setcdr timer nil)))))
+
;; From Circe
(defun erc-server-send-queue (buffer)
"Send messages in `erc-server-flood-queue'.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Erc-commit] [commit][master] Move definition of a function to get rid of byte-compiler warning,
mwolson <=