From 9e01cb95e13ab20499ff71dfae004494df31bdcc Mon Sep 17 00:00:00 2001 From: yamaoka Date: Thu, 13 Feb 2003 22:54:50 +0000 Subject: [PATCH] Synch to Oort Gnus. --- lisp/ChangeLog | 10 ++++++++++ lisp/gnus-util.el | 27 +++++++++++---------------- lisp/spam.el | 4 ++-- 3 files changed, 23 insertions(+), 18 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 189f65d..c28c2a6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2003-02-13 Katsumi Yamaoka + + * gnus-util.el (gnus-faces-at): Simplify. + +2003-02-13 Teodor Zlatanov + + * spam.el (spam-ham-move-routine) + (spam-mark-spam-as-expired-and-move-routine): made the article + move conditional, so it's not called even if there's nothing to move + 2003-02-13 Kai Gro,A_(Bjohann * message.el (message-unix-mail-delimiter): Accept any whitespace diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index 6bd573d..cd82bed 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -744,23 +744,18 @@ and `print-level' to nil." b (setq b (next-single-property-change b 'gnus-face nil end)) prop val)))))) -(defmacro gnus-faces-at (pos) - "Return a list of faces at POS." +(defmacro gnus-faces-at (position) + "Return a list of faces at POSITION." (if (featurep 'xemacs) - `(let* ((pos ,pos) - (faces (list (get-text-property pos 'face)))) - (mapcar-extents - (lambda (extent) - (pushnew (extent-property extent 'face) faces)) - nil (current-buffer) pos pos) - (delq nil faces)) - `(let* ((pos ,pos) - (faces (list (get-text-property pos 'face))) - (overlays (overlays-at pos))) - (while overlays - (pushnew (plist-get (overlay-properties (pop overlays)) 'face) - faces)) - (delq nil faces)))) + `(let ((pos ,position)) + (mapcar-extents 'extent-face + nil (current-buffer) pos pos nil 'face)) + `(let ((pos ,position)) + (delq nil (cons (get-text-property pos 'face) + (mapcar + (lambda (overlay) + (overlay-get overlay 'face)) + (overlays-at pos))))))) ;;; Protected and atomic operations. dmoore@ucsd.edu 21.11.1996 ;;; The primary idea here is to try to protect internal datastructures diff --git a/lisp/spam.el b/lisp/spam.el index 89f77e9..66fd6df 100644 --- a/lisp/spam.el +++ b/lisp/spam.el @@ -423,7 +423,7 @@ your main source of newsgroup names." (when (stringp group) (dolist (article tomove) (gnus-summary-set-process-mark article)) - (gnus-summary-move-article nil group)))) + (when tomove (gnus-summary-move-article nil group))))) (defun spam-ham-move-routine (&optional group) (let ((articles gnus-newsgroup-articles) @@ -440,7 +440,7 @@ your main source of newsgroup names." ;; now do the actual move (dolist (article tomove) (gnus-summary-set-process-mark article)) - (gnus-summary-move-article nil group)))) + (when tomove (gnus-summary-move-article nil group))))) (defun spam-generic-register-routine (spam-func ham-func) (let ((articles gnus-newsgroup-articles) -- 1.7.10.4