From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/51949 Path: main.gmane.org!not-for-mail From: sigurd@12move.de (Karl =?iso-8859-1?q?Pfl=E4sterer?=) Newsgroups: gmane.emacs.gnus.general Subject: [PATCH] spam-stat-save and font-locking Date: Tue, 29 Apr 2003 16:55:14 +0200 Organization: Lemis World Sender: ding-owner@lists.math.uh.edu Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1051628584 8975 80.91.224.249 (29 Apr 2003 15:03:04 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 29 Apr 2003 15:03:04 +0000 (UTC) Original-X-From: ding-owner+M492@lists.math.uh.edu Tue Apr 29 17:03:03 2003 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19AWb0-00029X-00 for ; Tue, 29 Apr 2003 17:00:39 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19AWc2-0000EV-00; Tue, 29 Apr 2003 10:01:42 -0500 Original-Received: from sclp3.sclp.com ([64.157.176.121]) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19AWXF-0000Dn-00 for ding@lists.math.uh.edu; Tue, 29 Apr 2003 09:56:45 -0500 Original-Received: (qmail 7823 invoked by alias); 29 Apr 2003 14:56:45 -0000 Original-Received: (qmail 7817 invoked from network); 29 Apr 2003 14:56:45 -0000 Original-Received: from quimby.gnus.org (80.91.224.244) by sclp3.sclp.com with SMTP; 29 Apr 2003 14:56:45 -0000 Original-Received: from news by quimby.gnus.org with local (Exim 3.12 #1 (Debian)) id 19AWen-0002Du-00 for ; Tue, 29 Apr 2003 17:04:33 +0200 Original-To: ding@gnus.org Original-Path: wintendo.pflaesterer.de!not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 70 Original-NNTP-Posting-Host: a1f32.pppool.de Original-X-Trace: quimby.gnus.org 1051628673 8549 213.6.31.50 (29 Apr 2003 15:04:33 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 29 Apr 2003 15:04:33 GMT X-Face: #iIcL\6>Qj/G*F@AL9T*v/R$j@7Q`6#FU&Flg6u6aVsLdWf(H$U5>:;&*>oy>jOIWgA%8w* A!V7X`\fEGoQ[@D'@i^*p3FCC6&Rg~JT/H_*MOX;"o~flADb8^ Mail-Copies-To: never X-Generated-By: Patcher version 3.4-b2 User-Agent: Gnus/5.09002 (Oort Gnus v0.20) Hamster/2.0.2.1 Cancel-Lock: sha1:Dq/35C9EtGqHaoQvEUGE8hOYRBw= Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:51949 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:51949 Hi, as the wordlist generated with `spam-stat-process-.*' grows I noticed that the saved file gets font-locked while saving. Not very nice as this needs some seconds. So I wrote this little patch that sets locally `font-lock-maximum-size' to 0. So no font-locking happens. Also I know that we have a feature freeze I send that patch now as I regard that behaviour as a bug. Gnus ChangeLog patch: Diff command: cvs -q diff -U 0 Files affected: ChangeLog Index: ChangeLog =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/ChangeLog,v retrieving revision 6.2289 diff -u -U0 -r6.2289 ChangeLog --- ChangeLog 27 Apr 2003 12:07:43 -0000 6.2289 +++ ChangeLog 29 Apr 2003 14:56:22 -0000 @@ -0,0 +1,5 @@ +2003-04-29 Karl Pflästerer + + * spam-stat.el (spam-stat-save): No longer font-locks the file + when saving + Gnus source patch: Diff command: cvs -q diff Files affected: spam-stat.el Index: spam-stat.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/spam-stat.el,v retrieving revision 6.9 diff -u -r6.9 spam-stat.el --- spam-stat.el 8 Feb 2003 21:20:53 -0000 6.9 +++ spam-stat.el 29 Apr 2003 14:54:26 -0000 @@ -398,7 +398,8 @@ "Save the `spam-stat' hash table as lisp file." (interactive) (with-temp-buffer - (let ((standard-output (current-buffer))) + (let ((standard-output (current-buffer)) + (font-lock-maximum-size 0)) (insert "(setq spam-stat-ngood " (number-to-string spam-stat-ngood) " spam-stat-nbad " @@ -409,8 +410,8 @@ (spam-stat-good entry) (spam-stat-bad entry)))) spam-stat) - (insert ")))")) - (write-file spam-stat-file))) + (insert ")))") + (write-file spam-stat-file)))) (defun spam-stat-load () "Read the `spam-stat' hash table from disk." bye KP -- "But it has nothing to do with what a _value_ is. This has to do with whether you pass whatever-a-value-is or wherever-whatever-is-a-value-is whenever you pass an argument to a function. (Call it the Shakira theory. :)" [Erik Naggum in cll über call-by-value und call-by-reference]