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

* Re: [PATCH] spam-stat-save and font-locking
  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
  0 siblings, 1 reply; 5+ messages in thread
From: Ted Zlatanov @ 2003-04-29 16:05 UTC (permalink / raw)


On Tue, 29 Apr 2003, sigurd@12move.de wrote:
> 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.

Committed.  This is small enough that you don't need to have papers on
file with the FSF, I believe.

Thanks
Ted



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

* Re: [PATCH] spam-stat-save and font-locking
  2003-04-29 16:05 ` Ted Zlatanov
@ 2003-05-02  4:38   ` Alex Schroeder
  2003-05-02  8:41     ` Reiner Steib
  0 siblings, 1 reply; 5+ messages in thread
From: Alex Schroeder @ 2003-05-02  4:38 UTC (permalink / raw)


Ted Zlatanov <tzz@lifelogs.com> writes:

>> Also I know that we have a feature freeze I send that patch now as I
>> regard that behaviour as a bug.
>
> Committed.  This is small enough that you don't need to have papers on
> file with the FSF, I believe.

I faintly remember RMS saying that in such cases, a little indication
in the ChangeLog.  For a recent patch I received I added "(tiny
change)" after the email address of the author, using
emacs/lisp/ChangeLog as a model.  Not sure whether Gnus is supposed
to follow suite.

Alex.
-- 
http://www.emacswiki.org/cgi-bin/alex.pl



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

* Re: [PATCH] spam-stat-save and font-locking
  2003-05-02  4:38   ` Alex Schroeder
@ 2003-05-02  8:41     ` Reiner Steib
  2003-05-02 16:20       ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Reiner Steib @ 2003-05-02  8:41 UTC (permalink / raw)


On Fri, May 02 2003, Alex Schroeder wrote:

> Ted Zlatanov <tzz@lifelogs.com> writes:
>> Committed.  This is small enough that you don't need to have papers on
>> file with the FSF, I believe.
>
> I faintly remember RMS saying that in such cases, a little indication
> in the ChangeLog.  For a recent patch I received I added "(tiny
> change)" after the email address of the author, using
> emacs/lisp/ChangeLog as a model.  Not sure whether Gnus is supposed
> to follow suite.

As Gnus is part of Emacs, I guess we should.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo--- PGP key available via WWW   http://rsteib.home.pages.de/




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

* Re: [PATCH] spam-stat-save and font-locking
  2003-05-02  8:41     ` Reiner Steib
@ 2003-05-02 16:20       ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 5+ messages in thread
From: Lars Magne Ingebrigtsen @ 2003-05-02 16:20 UTC (permalink / raw)


Reiner Steib <4.uce.03.r.s@nurfuerspam.de> writes:

> As Gnus is part of Emacs, I guess we should.

Yup.

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



^ 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).