Update of /cvsroot/emacs-jabber/emacs-jabber
In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv4742
Modified Files:
jabber.el AUTHORS NEWS
Added Files:
jabber-clean.el
Log Message:
Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-350
Creator: Magnus Henoch <ma...@fr...>
Add jabber-clean
>From Kirill A. Korinskiy
--- NEW FILE: jabber-clean.el ---
;; jabber-clean.el - cleanup top lines in chatbuffers
;; Copyright (C) 2007 - Kirill A. Korinskiy - ca...@ca...
;; This file is a part of jabber.el.
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, write to the Free Software
;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(require 'jabber-chat)
(eval-when-compile (require 'cl))
(defvar jabber-log-lines-to-keep 1000
"Maximum number of lines in chat buffer")
(defun jabber-clean-top ()
"Clean old history from a chat buffer.
`jabber-log-lines-to-keep' specifies the number of lines to
keep."
(interactive)
(let ((inhibit-read-only t)
(delete-before
;; go back one node, to make this function "idempotent"
(ewoc-prev
jabber-chat-ewoc
(ewoc-locate jabber-chat-ewoc
(save-excursion
(goto-char (point-max))
(forward-line (- jabber-log-lines-to-keep))
(point))))))
(while delete-before
(setq delete-before
(prog1
(ewoc-prev jabber-chat-ewoc delete-before)
(ewoc-delete jabber-chat-ewoc delete-before))))))
(defun jabber-clean-muc (nick group buffer text proposed-alert)
"Clean old history from MUC buffers.
`jabber-log-lines-to-keep' specifies the number of lines to
keep."
(jabber-clean-top))
(pushnew 'jabber-clean-muc (get 'jabber-alert-muc-hooks 'custom-options))
(provide 'jabber-clean)
;; arch-tag: 3d1e3428-f598-11db-a314-000a95c2fcd0
Index: NEWS
===================================================================
RCS file: /cvsroot/emacs-jabber/emacs-jabber/NEWS,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- NEWS 15 Apr 2007 23:53:24 -0000 1.55
+++ NEWS 28 Apr 2007 15:00:36 -0000 1.56
@@ -9,6 +9,10 @@
See jabber-show-offline-contacts.
(not documented yet)
+** Clean history from chat buffers
+See jabber-clean-top and new option for jabber-alert-muc-hooks.
+(not documented yet)
+
* New features in jabber.el 0.7.1
** STARTTLS
Index: jabber.el
===================================================================
RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber.el,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -d -r1.72 -r1.73
--- jabber.el 12 Feb 2007 20:50:22 -0000 1.72
+++ jabber.el 28 Apr 2007 15:00:36 -0000 1.73
@@ -1,7 +1,7 @@
;; jabber.el - a minimal jabber client
+;; Copyright (C) 2003, 2004, 2007 - Magnus Henoch - ma...@fr...
;; Copyright (C) 2002, 2003, 2004 - tom berger - ob...@in...
-;; Copyright (C) 2003, 2004 - Magnus Henoch - ma...@fr...
;; SSL - Support, mostly inspired by Gnus
;; Copyright (C) 2005 - Georg Lehner - jo...@ma...
@@ -104,6 +104,7 @@
(require 'jabber-vcard-avatars)
(require 'jabber-autoaway)
(require 'jabber-time)
+(require 'jabber-clean)
(require 'jabber-ft-client)
(require 'jabber-ft-server)
Index: AUTHORS
===================================================================
RCS file: /cvsroot/emacs-jabber/emacs-jabber/AUTHORS,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- AUTHORS 20 Mar 2007 11:49:32 -0000 1.8
+++ AUTHORS 28 Apr 2007 15:00:36 -0000 1.9
@@ -9,6 +9,7 @@
François Fleuret
David Hansen
Justin Kirby
+Kirill A. Korinskiy
Carl Henrik Lunde
Andrey Slusar
Evgenii Terechkov
|