From: yamaoka Date: Wed, 5 Feb 2003 05:18:57 +0000 (+0000) Subject: Synch to Oort Gnus. X-Git-Tag: t-gnus-6_15_16-00-quimby~11 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49a45aa37cb226f381f03978f8072047ec9f2e76;p=elisp%2Fgnus.git- Synch to Oort Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ba14d16..03200c9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,18 @@ +2003-02-05 Jesper Harder + + * gnus-util.el (gnus-delete-if): Rename to gnus-remove-if. + "delete-if" is misleading because it isn't actually destructive. + + * gnus-topic.el (gnus-group-prepare-topics): Use new name. + + * nnmail.el (nnmail-purge-split-history): do. + + * gnus-win.el (gnus-get-buffer-window): do. + + * gnus-sum.el (gnus-simplify-whitespace): Remove unnecessary + let-binding. + (gnus-simplify-all-whitespace): do. + 2003-02-05 Katsumi Yamaoka * gnus-delay.el (gnus-delay-article): Fix binding of the diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index c907923..30e1dd1 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -1410,26 +1410,24 @@ buffers. For example: (defun gnus-simplify-whitespace (str) "Remove excessive whitespace from STR." - (let ((mystr str)) - ;; Multiple spaces. - (while (string-match "[ \t][ \t]+" mystr) - (setq mystr (concat (substring mystr 0 (match-beginning 0)) - " " - (substring mystr (match-end 0))))) - ;; Leading spaces. - (when (string-match "^[ \t]+" mystr) - (setq mystr (substring mystr (match-end 0)))) - ;; Trailing spaces. - (when (string-match "[ \t]+$" mystr) - (setq mystr (substring mystr 0 (match-beginning 0)))) - mystr)) + ;; Multiple spaces. + (while (string-match "[ \t][ \t]+" str) + (setq str (concat (substring str 0 (match-beginning 0)) + " " + (substring str (match-end 0))))) + ;; Leading spaces. + (when (string-match "^[ \t]+" str) + (setq str (substring str (match-end 0)))) + ;; Trailing spaces. + (when (string-match "[ \t]+$" str) + (setq str (substring str 0 (match-beginning 0)))) + str) (defun gnus-simplify-all-whitespace (str) "Remove all whitespace from STR." - (let ((mystr str)) - (while (string-match "[ \t\n]+" mystr) - (setq mystr (replace-match "" nil nil mystr))) - mystr)) + (while (string-match "[ \t\n]+" str) + (setq str (replace-match "" nil nil str))) + str) (defsubst gnus-simplify-subject-re (subject) "Remove \"Re:\" from subject lines." diff --git a/lisp/gnus-topic.el b/lisp/gnus-topic.el index b99f3ac..7ef69f9 100644 --- a/lisp/gnus-topic.el +++ b/lisp/gnus-topic.el @@ -1,5 +1,5 @@ ;;; gnus-topic.el --- a folding minor mode for Gnus group buffers -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 +;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 ;; Free Software Foundation, Inc. ;; Author: Ilja Weis @@ -462,7 +462,7 @@ If LOWEST is non-nil, list all newsgroups of level LOWEST or higher." (unless gnus-killed-hashtb (gnus-make-hashtable-from-killed)) (gnus-group-prepare-flat-list-dead - (gnus-delete-if (lambda (group) + (gnus-remove-if (lambda (group) (or (gnus-gethash group gnus-newsrc-hashtb) (gnus-gethash group gnus-killed-hashtb))) not-in-list) diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index fa38685..c78ad13 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -990,13 +990,13 @@ ARG is passed to the first function." (setq tail (cdr tail))) (nreverse new))) -(defun gnus-delete-if (predicate list) - "Delete elements from LIST that satisfy PREDICATE." +(defun gnus-remove-if (predicate list) + "Return a copy of LIST with all items satisfying PREDICATE removed." (let (out) (while list (unless (funcall predicate (car list)) (push (car list) out)) - (pop list)) + (setq list (cdr list))) (nreverse out))) (if (fboundp 'assq-delete-all) diff --git a/lisp/gnus-win.el b/lisp/gnus-win.el index ab6fb9c..f95e52e 100644 --- a/lisp/gnus-win.el +++ b/lisp/gnus-win.el @@ -1,5 +1,5 @@ ;;; gnus-win.el --- window configuration functions for Gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 +;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen @@ -571,7 +571,7 @@ should have point." (memq frame '(t 0 visible))) (car (let ((frames (gnus-frames-on-display-list))) - (gnus-delete-if (lambda (win) (not (memq (window-frame win) + (gnus-remove-if (lambda (win) (not (memq (window-frame win) frames))) (get-buffer-window-list buffer nil frame))))) (t diff --git a/lisp/nnmail.el b/lisp/nnmail.el index d0b27d8..46439f4 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -1882,7 +1882,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." "Remove all instances of GROUP from `nnmail-split-history'." (let ((history nnmail-split-history)) (while history - (setcar history (gnus-delete-if (lambda (e) (string= (car e) group)) + (setcar history (gnus-remove-if (lambda (e) (string= (car e) group)) (car history))) (pop history)) (setq nnmail-split-history (delq nil nnmail-split-history))))