Mercurial > emacs
comparison lisp/gnus/gnus-logic.el @ 31716:9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Tue, 19 Sep 2000 13:37:09 +0000 |
parents | 15fc6acbae7a |
children | 88bece18cf0d |
comparison
equal
deleted
inserted
replaced
31715:7c896543d225 | 31716:9968f55ad26e |
---|---|
1 ;;; gnus-logic.el --- advanced scoring code for Gnus | 1 ;;; gnus-logic.el --- advanced scoring code for Gnus |
2 ;; Copyright (C) 1996,97,98 Free Software Foundation, Inc. | 2 ;; Copyright (C) 1996, 1997, 1998, 1999, 2000 |
3 ;; Free Software Foundation, Inc. | |
3 | 4 |
4 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> | 5 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> |
5 ;; Keywords: news | 6 ;; Keywords: news |
6 | 7 |
7 ;; This file is part of GNU Emacs. | 8 ;; This file is part of GNU Emacs. |
22 ;; Boston, MA 02111-1307, USA. | 23 ;; Boston, MA 02111-1307, USA. |
23 | 24 |
24 ;;; Commentary: | 25 ;;; Commentary: |
25 | 26 |
26 ;;; Code: | 27 ;;; Code: |
27 | |
28 (eval-when-compile (require 'cl)) | |
29 | 28 |
30 (eval-when-compile (require 'cl)) | 29 (eval-when-compile (require 'cl)) |
31 | 30 |
32 (require 'gnus) | 31 (require 'gnus) |
33 (require 'gnus-score) | 32 (require 'gnus-score) |
171 (match (apply 'encode-time (parse-time-string match)))) | 170 (match (apply 'encode-time (parse-time-string match)))) |
172 (cond | 171 (cond |
173 ((eq type 'at) | 172 ((eq type 'at) |
174 (equal date match)) | 173 (equal date match)) |
175 ((eq type 'before) | 174 ((eq type 'before) |
176 (gnus-time-less match date)) | 175 (time-less-p match date)) |
177 ((eq type 'after) | 176 ((eq type 'after) |
178 (gnus-time-less date match)) | 177 (time-less-p date match)) |
179 (t | 178 (t |
180 (error "No such date score type: %s" type))))) | 179 (error "No such date score type: %s" type))))) |
181 | 180 |
182 (defun gnus-advanced-body (header match type) | 181 (defun gnus-advanced-body (header match type) |
183 (when (string= header "all") | 182 (when (string= header "all") |
218 (cond ((memq type '(r R regexp Regexp)) | 217 (cond ((memq type '(r R regexp Regexp)) |
219 're-search-forward) | 218 're-search-forward) |
220 ((memq type '(s S string String)) | 219 ((memq type '(s S string String)) |
221 'search-forward) | 220 'search-forward) |
222 (t | 221 (t |
223 (error "Illegal match type: %s" type))))) | 222 (error "Invalid match type: %s" type))))) |
224 (goto-char (point-min)) | 223 (goto-char (point-min)) |
225 (prog1 | 224 (prog1 |
226 (funcall search-func match nil t) | 225 (funcall search-func match nil t) |
227 (widen))))))) | 226 (widen))))))) |
228 | 227 |