Gnus development mailing list
 help / color / mirror / Atom feed
* [PATCH] spam-stat-save and font-locking
@ 2003-04-29 14:55 Karl Pflästerer
  2003-04-29 16:05 ` Ted Zlatanov
  0 siblings, 1 reply; 5+ messages in thread
From: Karl Pflästerer @ 2003-04-29 14:55 UTC (permalink / raw)


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  <sigurd@12move.de>
+
+	* 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]



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-05-02 16:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-29 14:55 [PATCH] spam-stat-save and font-locking Karl Pflästerer
2003-04-29 16:05 ` Ted Zlatanov
2003-05-02  4:38   ` Alex Schroeder
2003-05-02  8:41     ` Reiner Steib
2003-05-02 16:20       ` Lars Magne Ingebrigtsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).