diff options
| author | Miles Bader | 2008-05-08 09:59:46 +0000 |
|---|---|---|
| committer | Miles Bader | 2008-05-08 09:59:46 +0000 |
| commit | 0ab5c2be341094f6e5cc440a34401f369ec3d0a9 (patch) | |
| tree | f7bb5c56d07d6a72ca228580a62a9b55f3eb8a8d | |
| parent | 7d56ad0dd1e8bd4606a0aff889768492b23236f5 (diff) | |
| download | emacs-0ab5c2be341094f6e5cc440a34401f369ec3d0a9.tar.gz emacs-0ab5c2be341094f6e5cc440a34401f369ec3d0a9.zip | |
Merge from gnus--devo--0
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1149
| -rw-r--r-- | lisp/gnus/ChangeLog | 18 | ||||
| -rw-r--r-- | lisp/gnus/gnus-registry.el | 28 | ||||
| -rw-r--r-- | lisp/gnus/gnus-util.el | 9 |
3 files changed, 40 insertions, 15 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 4fef0820bb7..4f70aabd321 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -3,6 +3,24 @@ | |||
| 3 | * gnus-art.el (gnus-article-toggle-truncate-lines): | 3 | * gnus-art.el (gnus-article-toggle-truncate-lines): |
| 4 | Don't use `iff' in docstring. | 4 | Don't use `iff' in docstring. |
| 5 | 5 | ||
| 6 | 2008-05-07 Teodor Zlatanov <tzz@lifelogs.com> | ||
| 7 | |||
| 8 | * gnus-registry.el: Adjusted copyright dates and added a keyword. | ||
| 9 | |||
| 10 | * gnus-util.el (gnus-extract-address-component-name) | ||
| 11 | (gnus-extract-address-component-email): Convenience functions around | ||
| 12 | `gnus-extract-address-components'. | ||
| 13 | |||
| 14 | * gnus-registry.el (gnus-registry-split-fancy-with-parent): Use | ||
| 15 | `gnus-extract-address-component-email' to fix bug of comparing full | ||
| 16 | sender name to `user-mail-address'. | ||
| 17 | |||
| 18 | 2008-05-05 Teodor Zlatanov <tzz@lifelogs.com> | ||
| 19 | |||
| 20 | * gnus-registry.el (gnus-registry-grep-in-list): Fix logic, use | ||
| 21 | catch/throw to optimize. | ||
| 22 | (gnus-registry-find-keywords): Just use member to find a keyword. | ||
| 23 | |||
| 6 | 2008-05-07 Stefan Monnier <monnier@iro.umontreal.ca> | 24 | 2008-05-07 Stefan Monnier <monnier@iro.umontreal.ca> |
| 7 | 25 | ||
| 8 | * gnus-srvr.el (gnus-enter-server-buffer): Make sure the server-buffer | 26 | * gnus-srvr.el (gnus-enter-server-buffer): Make sure the server-buffer |
diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el index 349f29aeb3c..18163fe452f 100644 --- a/lisp/gnus/gnus-registry.el +++ b/lisp/gnus/gnus-registry.el | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | ;;; gnus-registry.el --- article registry for Gnus | 1 | ;;; gnus-registry.el --- article registry for Gnus |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, | 3 | ;;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 |
| 4 | ;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc. | 4 | ;;; Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Ted Zlatanov <tzz@lifelogs.com> | 6 | ;; Author: Ted Zlatanov <tzz@lifelogs.com> |
| 7 | ;; Keywords: news | 7 | ;; Keywords: news registry |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
| @@ -523,7 +523,8 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." | |||
| 523 | ;; else: there were no matches, now try the extra tracking by sender | 523 | ;; else: there were no matches, now try the extra tracking by sender |
| 524 | ((and (gnus-registry-track-sender-p) | 524 | ((and (gnus-registry-track-sender-p) |
| 525 | sender | 525 | sender |
| 526 | (not (equal sender user-mail-address))) | 526 | (not (equal (gnus-extract-address-component-email sender) |
| 527 | user-mail-address))) | ||
| 527 | (maphash | 528 | (maphash |
| 528 | (lambda (key value) | 529 | (lambda (key value) |
| 529 | (let ((this-sender (cdr | 530 | (let ((this-sender (cdr |
| @@ -678,9 +679,8 @@ Consults `gnus-registry-unfollowed-groups' and | |||
| 678 | (let (articles) | 679 | (let (articles) |
| 679 | (maphash | 680 | (maphash |
| 680 | (lambda (key value) | 681 | (lambda (key value) |
| 681 | (when (gnus-registry-grep-in-list | 682 | (when (member keyword |
| 682 | keyword | 683 | (cdr-safe (gnus-registry-fetch-extra key 'keywords))) |
| 683 | (cdr (gnus-registry-fetch-extra key 'keywords))) | ||
| 684 | (push key articles))) | 684 | (push key articles))) |
| 685 | gnus-registry-hashtb) | 685 | gnus-registry-hashtb) |
| 686 | articles)) | 686 | articles)) |
| @@ -730,15 +730,13 @@ Consults `gnus-registry-unfollowed-groups' and | |||
| 730 | (assoc article (gnus-data-list nil))))) | 730 | (assoc article (gnus-data-list nil))))) |
| 731 | nil)) | 731 | nil)) |
| 732 | 732 | ||
| 733 | ;;; this should be redone with catch/throw | ||
| 734 | (defun gnus-registry-grep-in-list (word list) | 733 | (defun gnus-registry-grep-in-list (word list) |
| 735 | (when word | 734 | "Find if a WORD matches any regular expression in the given LIST." |
| 736 | (memq nil | 735 | (when (and word list) |
| 737 | (mapcar 'not | 736 | (catch 'found |
| 738 | (mapcar | 737 | (dolist (r list) |
| 739 | (lambda (x) | 738 | (when (string-match r word) |
| 740 | (string-match word x)) | 739 | (throw 'found r)))))) |
| 741 | list))))) | ||
| 742 | 740 | ||
| 743 | (defun gnus-registry-do-marks (type function) | 741 | (defun gnus-registry-do-marks (type function) |
| 744 | "For each known mark, call FUNCTION for each cell of type TYPE. | 742 | "For each known mark, call FUNCTION for each cell of type TYPE. |
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 21fda618e06..a3275224e7f 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el | |||
| @@ -193,6 +193,15 @@ is slower." | |||
| 193 | (match-end 0))))) | 193 | (match-end 0))))) |
| 194 | (list (if (string= name "") nil name) (or address from)))) | 194 | (list (if (string= name "") nil name) (or address from)))) |
| 195 | 195 | ||
| 196 | (defun gnus-extract-address-component-name (from) | ||
| 197 | "Extract name from a From header. | ||
| 198 | Uses `gnus-extract-address-components'." | ||
| 199 | (nth 0 (gnus-extract-address-components from))) | ||
| 200 | |||
| 201 | (defun gnus-extract-address-component-email (from) | ||
| 202 | "Extract e-mail address from a From header. | ||
| 203 | Uses `gnus-extract-address-components'." | ||
| 204 | (nth 1 (gnus-extract-address-components from))) | ||
| 196 | 205 | ||
| 197 | (defun gnus-fetch-field (field) | 206 | (defun gnus-fetch-field (field) |
| 198 | "Return the value of the header FIELD of current article." | 207 | "Return the value of the header FIELD of current article." |