From 5997e34085a4cc5d6292bcc2bab45ba2a128d550 Mon Sep 17 00:00:00 2001 From: Fran Litterio Date: Sun, 8 Aug 2010 18:13:53 -0400 Subject: 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. --- lisp/erc/ChangeLog | 8 ++++++++ lisp/erc/erc-backend.el | 1 + lisp/erc/erc.el | 4 ++-- 3 files changed, 11 insertions(+), 2 deletions(-) (limited to 'lisp/erc') 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 @@ +2010-08-08 Fran Litterio + + * 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. + 2010-05-07 Chong Yidong * 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." nil (substring erc-server-filter-data (match-end 0)))) + (erc-log-irc-protocol line nil) (erc-parse-server-response process line))))))) (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." (insert (erc-make-notice "This buffer displays all IRC protocol traffic exchanged with each server.\n")) (insert (erc-make-notice "Kill this buffer to terminate protocol logging.\n\n"))) (use-local-map (make-sparse-keymap)) - (local-set-key (kbd "RET") 'erc-toggle-debug-irc-protocol)) + (local-set-key (kbd "t") 'erc-toggle-debug-irc-protocol)) (add-hook 'kill-buffer-hook #'(lambda () (setq erc-debug-irc-protocol nil)) nil 'local) (goto-char (point-max)) (let ((inhibit-read-only t)) (insert (erc-make-notice - (format "IRC protocol logging %s at %s -- Press ENTER to toggle logging.\n" + (format "IRC protocol logging %s at %s -- Press `t' to toggle logging.\n" (if erc-debug-irc-protocol "disabled" "enabled") (current-time-string)))))) (setq erc-debug-irc-protocol (not erc-debug-irc-protocol)) -- cgit v1.2.3-70-g09d2