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