From 9134b17b1be7f7d2d5ba025fbe307aa674803c10 Mon Sep 17 00:00:00 2001 From: Evgenii Terechkov Date: Tue, 23 Feb 2010 22:42:14 +0700 Subject: [PATCH] Fetch all available history for jid on (jabber-chat-display-more-backlog 0). --- jabber-chat.el | 5 +++-- jabber-history.el | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/jabber-chat.el b/jabber-chat.el index 9f3ec0c..a71328d 100644 --- a/jabber-chat.el +++ b/jabber-chat.el @@ -278,10 +278,11 @@ This function is idempotent." (cons "Display more context" 'jabber-chat-display-more-backlog)) (defun jabber-chat-display-more-backlog (how-many) - (interactive "nHow many more messages? ") + "Display more context. HOW-MANY is number of messages. Specify 0 to display all messages." + (interactive "nHow many more messages (Specify 0 to display all)? ") (let* ((inhibit-read-only t) (jabber-backlog-days nil) - (jabber-backlog-number how-many) + (jabber-backlog-number (if (= how-many 0) t how-many)) (backlog-entries (jabber-history-backlog jabber-chatting-with jabber-chat-earliest-backlog))) (when backlog-entries diff --git a/jabber-history.el b/jabber-history.el index 3544be7..e64f9c4 100644 --- a/jabber-history.el +++ b/jabber-history.el @@ -207,8 +207,9 @@ of the log file." (let ((file (pop matched-files))) (progn (insert-file-contents file) - (if (>= (count-lines (point-min) (point-max)) number) - (setq lines-collected t))))))))) + (when (numberp number) + (if (>= (count-lines (point-min) (point-max)) number) + (setq lines-collected t)))))))))) (let (collected current-line) (goto-char (point-max)) (catch 'beginning-of-file