aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFran Litterio2010-08-08 18:13:53 -0400
committerChong Yidong2010-08-08 18:13:53 -0400
commit5997e34085a4cc5d6292bcc2bab45ba2a128d550 (patch)
treeaa44fb0db7e4d5e217e7d41015cb6b033ae882c2
parent7adf5fdcb806eacfe9a2b2fcdbea6f7907e1af50 (diff)
downloademacs-5997e34085a4cc5d6292bcc2bab45ba2a128d550.tar.gz
emacs-5997e34085a4cc5d6292bcc2bab45ba2a128d550.zip
Ensure that erc-toggle-debug-irc-protocol logs protocol data.
http://lists.gnu.org/archive/html/emacs-devel/2010-07/msg01000.html * erc-backend.el (erc-server-filter-function): Call erc-log-irc-protocol. * erc.el (erc-toggle-debug-irc-protocol): Bind erc-toggle-debug-irc-protocol to t.
-rw-r--r--lisp/erc/ChangeLog8
-rw-r--r--lisp/erc/erc-backend.el1
-rw-r--r--lisp/erc/erc.el4
3 files changed, 11 insertions, 2 deletions
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog
index 7a29e3d0776..6591db6cd94 100644
--- a/lisp/erc/ChangeLog
+++ b/lisp/erc/ChangeLog
@@ -1,3 +1,11 @@
12010-08-08 Fran Litterio <flitterio@gmail.com>
2
3 * erc-backend.el (erc-server-filter-function): Call
4 erc-log-irc-protocol.
5
6 * erc.el (erc-toggle-debug-irc-protocol): Bind
7 erc-toggle-debug-irc-protocol to t.
8
12010-05-07 Chong Yidong <cyd@stupidchicken.com> 92010-05-07 Chong Yidong <cyd@stupidchicken.com>
2 10
3 * Version 23.2 released. 11 * Version 23.2 released.
diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el
index 8b533b4c255..9a237d47d55 100644
--- a/lisp/erc/erc-backend.el
+++ b/lisp/erc/erc-backend.el
@@ -574,6 +574,7 @@ Make sure you are in an ERC buffer when running this."
574 nil 574 nil
575 (substring erc-server-filter-data 575 (substring erc-server-filter-data
576 (match-end 0)))) 576 (match-end 0))))
577 (erc-log-irc-protocol line nil)
577 (erc-parse-server-response process line))))))) 578 (erc-parse-server-response process line)))))))
578 579
579(defsubst erc-server-reconnect-p (event) 580(defsubst erc-server-reconnect-p (event)
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index b76f486f155..ce4c9a46f5b 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -2306,14 +2306,14 @@ If ARG is non-nil, show the *erc-protocol* buffer."
2306 (insert (erc-make-notice "This buffer displays all IRC protocol traffic exchanged with each server.\n")) 2306 (insert (erc-make-notice "This buffer displays all IRC protocol traffic exchanged with each server.\n"))
2307 (insert (erc-make-notice "Kill this buffer to terminate protocol logging.\n\n"))) 2307 (insert (erc-make-notice "Kill this buffer to terminate protocol logging.\n\n")))
2308 (use-local-map (make-sparse-keymap)) 2308 (use-local-map (make-sparse-keymap))
2309 (local-set-key (kbd "RET") 'erc-toggle-debug-irc-protocol)) 2309 (local-set-key (kbd "t") 'erc-toggle-debug-irc-protocol))
2310 (add-hook 'kill-buffer-hook 2310 (add-hook 'kill-buffer-hook
2311 #'(lambda () (setq erc-debug-irc-protocol nil)) 2311 #'(lambda () (setq erc-debug-irc-protocol nil))
2312 nil 'local) 2312 nil 'local)
2313 (goto-char (point-max)) 2313 (goto-char (point-max))
2314 (let ((inhibit-read-only t)) 2314 (let ((inhibit-read-only t))
2315 (insert (erc-make-notice 2315 (insert (erc-make-notice
2316 (format "IRC protocol logging %s at %s -- Press ENTER to toggle logging.\n" 2316 (format "IRC protocol logging %s at %s -- Press `t' to toggle logging.\n"
2317 (if erc-debug-irc-protocol "disabled" "enabled") 2317 (if erc-debug-irc-protocol "disabled" "enabled")
2318 (current-time-string)))))) 2318 (current-time-string))))))
2319 (setq erc-debug-irc-protocol (not erc-debug-irc-protocol)) 2319 (setq erc-debug-irc-protocol (not erc-debug-irc-protocol))