From: yamaoka Date: Tue, 29 Jan 2002 23:33:20 +0000 (+0000) Subject: Synch with Oort Gnus. X-Git-Tag: t-gnus-6_15_6-01-quimby~93 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5577537f351ed1daa999cf9e355a6007103612de;p=elisp%2Fgnus.git- Synch with Oort Gnus. --- diff --git a/ChangeLog b/ChangeLog index ad7bd11..00b0504 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2002-01-29 Katsumi Yamaoka + * lisp/message.el (message-cite-prefix-regexp): Fix the regexp. + * lisp/gnus-sum.el (gnus-mime-extract-message/rfc822): New implementation. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 915c231..1b7fff1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,37 @@ 2002-01-29 ShengHuo ZHU + * message.el (message-mode-syntax-table): Move forward. + (message-cite-prefix-regexp): Auto detect non word constituents. + (message-cite-prefix-regexp): Don't use with-syntax-table. + + * gnus-sum.el (gnus-summary-update-info): Use + gnus-list-range-intersection. + + * gnus-agent.el (gnus-agent-fetch-headers): Use + gnus-list-range-intersection. + + * gnus-range.el (gnus-range-normalize): Use correct predicate. + (gnus-list-range-intersection): Use it. + (gnus-inverse-list-range-intersection): Ditto. + (gnus-sorted-intersection): Add doc. + (gnus-set-sorted-intersection): Add doc. + (gnus-sorted-union): New function. + (gnus-set-sorted-union): New function. + + * gnus-range.el (gnus-list-range-intersection): Correct the logic. + (gnus-inverse-list-range-intersection): Ditto. + +2002-01-29 Karl Kleinpaste + + * mm-uu.el (mm-uu-type-alist): Add optional leading `0'. + + * gnus-uu.el (gnus-uu-shar-name-marker): Add optional leading `0' + and permit `:' and `\' in order to handle full Windows pathnames. + (gnus-uu-begin-string): Add optional leading `0'. Leading `0' is + technically not correct per standard, but seems to have common use. + +2002-01-29 ShengHuo ZHU + * gnus-uu.el (gnus-uu-expand-numbers): Ignore errors when replacing numbers. @@ -1188,7 +1220,7 @@ (gnus-convert-image-to-gray-x-face): Ditto. * gnus-sum.el (gnus-summary-make-menu-bar): Add a :keys to - gnus-summary0show-raw-article. + gnus-summary-show-raw-article. 2002-01-02 ShengHuo ZHU diff --git a/lisp/gnus-agent.el b/lisp/gnus-agent.el index 4950a85..9759317 100644 --- a/lisp/gnus-agent.el +++ b/lisp/gnus-agent.el @@ -1052,9 +1052,9 @@ the actual number of articles toggled is returned." (setq articles (sort (gnus-uncompress-sequence articles) '<)) ;; Remove known articles. (when (gnus-agent-load-alist group) - (setq articles (gnus-sorted-intersection + (setq articles (gnus-list-range-intersection articles - (gnus-uncompress-range + (list (cons (1+ (caar (last gnus-agent-article-alist))) (cdr (gnus-active group))))))) ;; Fetch them. diff --git a/lisp/gnus-range.el b/lisp/gnus-range.el index 8e3c097..43aa8b2 100644 --- a/lisp/gnus-range.el +++ b/lisp/gnus-range.el @@ -1,6 +1,6 @@ ;;; gnus-range.el --- range and sequence functions for Gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen @@ -34,7 +34,7 @@ (defsubst gnus-range-normalize (range) "Normalize RANGE. If RANGE is a single range, return (RANGE). Otherwise, return RANGE." - (if (listp (cdr range)) (list range) range)) + (if (listp (cdr-safe range)) range (list range))) (defun gnus-last-element (list) "Return last element of LIST." @@ -88,7 +88,8 @@ Both lists have to be sorted over <." result)) (defun gnus-sorted-intersection (list1 list2) - ;; LIST1 and LIST2 have to be sorted over <. + "Return intersection of LIST1 and LIST2. +LIST1 and LIST2 have to be sorted over <." (let (out) (while (and list1 list2) (cond ((= (car list1) (car list2)) @@ -102,8 +103,8 @@ Both lists have to be sorted over <." (nreverse out))) (defun gnus-set-sorted-intersection (list1 list2) - ;; LIST1 and LIST2 have to be sorted over <. - ;; This function modifies LIST1. + "Return intersection of LIST1 and LIST2 by modifying cdr pointers of LIST1. +LIST1 and LIST2 have to be sorted over <." (let* ((top (cons nil list1)) (prev top)) (while (and list1 list2) @@ -119,6 +120,53 @@ Both lists have to be sorted over <." (setcdr prev nil) (cdr top))) +(defun gnus-sorted-union (list1 list2) + "Return union of LIST1 and LIST2. +LIST1 and LIST2 have to be sorted over <." + (let (out) + (while (and list1 list2) + (cond ((= (car list1) (car list2)) + (setq out (cons (car list1) out) + list1 (cdr list1) + list2 (cdr list2))) + ((< (car list1) (car list2)) + (setq out (cons (car list1) out) + list1 (cdr list1))) + (t + (setq out (cons (car list2) out) + list2 (cdr list2))))) + (while list1 + (setq out (cons (car list1) out) + list1 (cdr list1))) + (while list2 + (setq out (cons (car list2) out) + list2 (cdr list2))) + (nreverse out))) + +(defun gnus-set-sorted-union (list1 list2) + "Return union of LIST1 and LIST2 by modifying cdr pointers of LIST1. +LIST1 and LIST2 have to be sorted over <." + (let* ((top (cons nil list1)) + (prev top)) + (while (and list1 list2) + (cond ((= (car list1) (car list2)) + (setq prev list1 + list1 (cdr list1) + list2 (cdr list2))) + ((< (car list1) (car list2)) + (setq prev list1 + list1 (cdr list1))) + (t + (setcdr prev (list (car list2))) + (setq prev (cdr prev) + list2 (cdr list2)) + (setcdr prev list1)))) + (while list2 + (setcdr prev (list (car list2))) + (setq prev (cdr prev) + list2 (cdr list2))) + (cdr top))) + (defun gnus-compress-sequence (numbers &optional always-list) "Convert list of numbers to a list of ranges or a single range. If ALWAYS-LIST is non-nil, this function will always release a list of @@ -328,6 +376,7 @@ modified." (defun gnus-list-range-intersection (list ranges) "Return a list of numbers in LIST that are members of RANGES. LIST is a sorted list." + (setq ranges (gnus-range-normalize ranges)) (let (number result) (while (setq number (pop list)) (while (and ranges @@ -338,13 +387,15 @@ LIST is a sorted list." (when (and ranges (if (numberp (car ranges)) (= (car ranges) number) - (< number (cdar ranges)))) + ;; (caar ranges) <= number <= (cdar ranges) + (>= number (caar ranges)))) (push number result))) (nreverse result))) (defun gnus-inverse-list-range-intersection (list ranges) "Return a list of numbers in LIST that are not members of RANGES. LIST is a sorted list." + (setq ranges (gnus-range-normalize ranges)) (let (number result) (while (setq number (pop list)) (while (and ranges @@ -355,7 +406,8 @@ LIST is a sorted list." (when (or (not ranges) (if (numberp (car ranges)) (not (= (car ranges) number)) - (not (<= number (cdar ranges))))) + ;; not ((caar ranges) <= number <= (cdar ranges)) + (< number (caar ranges)))) (push number result))) (nreverse result))) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index d12d3f2..4e11cbe 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -6020,10 +6020,10 @@ The prefix argument ALL means to select all articles." (setq gnus-newsgroup-killed (gnus-compress-sequence (nconc - (gnus-set-sorted-intersection - (gnus-uncompress-range gnus-newsgroup-killed) + (gnus-list-range-intersection (setq gnus-newsgroup-unselected - (sort gnus-newsgroup-unselected '<))) + (sort gnus-newsgroup-unselected '<)) + gnus-newsgroup-killed) (setq gnus-newsgroup-unreads (sort gnus-newsgroup-unreads '<))) t))) diff --git a/lisp/gnus-uu.el b/lisp/gnus-uu.el index cc800b4..6c1c315 100644 --- a/lisp/gnus-uu.el +++ b/lisp/gnus-uu.el @@ -320,7 +320,7 @@ didn't work, and overwrite existing files. Otherwise, ask each time." (defvar gnus-uu-saved-article-name nil) -(defvar gnus-uu-begin-string "^begin[ \t]+[0-7][0-7][0-7][ \t]+\\(.*\\)$") +(defvar gnus-uu-begin-string "^begin[ \t]+0?[0-7][0-7][0-7][ \t]+\\(.*\\)$") (defvar gnus-uu-end-string "^end[ \t]*$") (defvar gnus-uu-body-line "^M") @@ -335,7 +335,7 @@ didn't work, and overwrite existing files. Otherwise, ask each time." (defvar gnus-uu-shar-file-name nil) (defvar gnus-uu-shar-name-marker - "begin [0-7][0-7][0-7][ \t]+\\(\\(\\w\\|\\.\\)*\\b\\)") + "begin 0?[0-7][0-7][0-7][ \t]+\\(\\(\\w\\|[.\\:]\\)*\\b\\)") (defvar gnus-uu-postscript-begin-string "^%!PS-") (defvar gnus-uu-postscript-end-string "^%%EOF$") diff --git a/lisp/message.el b/lisp/message.el index b3ab83f..904c001 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -472,11 +472,32 @@ The provided functions are: :group 'message-insertion :type 'regexp) +(defvar message-mode-syntax-table + (let ((table (copy-syntax-table text-mode-syntax-table))) + (modify-syntax-entry ?% ". " table) + (modify-syntax-entry ?> ". " table) + (modify-syntax-entry ?< ". " table) + table) + "Syntax table used while in Message mode.") + (defcustom message-cite-prefix-regexp (if (string-match "[[:digit:]]" "1") ;; support POSIX? - "\\([ \t]*[-_.[:word:]]+>+\\|[ \t]*[]>~|:}+]\\)+" + "\\([ \t]*[-_.[:word:]]+>+\\|[ \t]*[]>»|:}+]\\)+" ;; ?-, ?_ or ?. MUST NOT be in syntax entry w. - "\\([ \t]*\\(\\w\\|[-_.]\\)+>+\\|[ \t]*[]>~|:}+]\\)+") + (let ((old-table (syntax-table)) + non-word-constituents) + (set-syntax-table message-mode-syntax-table) + (setq non-word-constituents + (concat + (if (string-match "\\w" "-") "" "-") + (if (string-match "\\w" "_") "" "_") + (if (string-match "\\w" ".") "" "."))) + (set-syntax-table old-table) + (if (equal non-word-constituents "") + "\\([ \t]*\\(\\w\\)+>+\\|[ \t]*[]>»|:}+]\\)+" + (concat "\\([ \t]*\\(\\w\\|[" + non-word-constituents + "]\\)+>+\\|[ \t]*[]>»|:}+]\\)+")))) "*Regexp matching the longest possible citation prefix on a line." :group 'message-insertion :type 'regexp) @@ -1019,14 +1040,6 @@ candidates: ;;; Internal variables. ;;; Well, not really internal. -(defvar message-mode-syntax-table - (let ((table (copy-syntax-table text-mode-syntax-table))) - (modify-syntax-entry ?% ". " table) - (modify-syntax-entry ?> ". " table) - (modify-syntax-entry ?< ". " table) - table) - "Syntax table used while in Message mode.") - (defface message-header-to-face '((((class color) (background dark)) diff --git a/lisp/mm-decode.el b/lisp/mm-decode.el index 6ebe59a..8e26afc 100644 --- a/lisp/mm-decode.el +++ b/lisp/mm-decode.el @@ -1,5 +1,5 @@ ;;; mm-decode.el --- Functions for decoding MIME things -;; Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; MORIOKA Tomohiko diff --git a/lisp/mm-uu.el b/lisp/mm-uu.el index 92964d0..96eaafb 100644 --- a/lisp/mm-uu.el +++ b/lisp/mm-uu.el @@ -1,5 +1,5 @@ ;;; mm-uu.el --- Return uu stuff as mm handles -;; Copyright (c) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +;; Copyright (c) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. ;; Author: Shenghuo Zhu ;; Keywords: postscript uudecode binhex shar forward gnatsweb pgp @@ -80,7 +80,7 @@ This can be either \"inline\" or \"attachment\".") mm-uu-postscript-extract nil) (uu - "^begin[ \t]+[0-7][0-7][0-7][ \t]+" + "^begin[ \t]+0?[0-7][0-7][0-7][ \t]+" "^end[ \t]*$" mm-uu-uu-extract mm-uu-uu-filename) diff --git a/lisp/mml-sec.el b/lisp/mml-sec.el index 0230e0f..fb6d229 100644 --- a/lisp/mml-sec.el +++ b/lisp/mml-sec.el @@ -1,5 +1,5 @@ ;;; mml-sec.el --- A package with security functions for MML documents -;; Copyright (C) 2000 Free Software Foundation, Inc. +;; Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. ;; Author: Simon Josefsson ;; This file is not part of GNU Emacs, but the same permissions apply. diff --git a/lisp/mml2015.el b/lisp/mml2015.el index 9001685..75af79c 100644 --- a/lisp/mml2015.el +++ b/lisp/mml2015.el @@ -1,5 +1,5 @@ ;;; mml2015.el --- MIME Security with Pretty Good Privacy (PGP) -;; Copyright (C) 2000, 2001 Free Software Foundation, Inc. +;; Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. ;; Author: Shenghuo Zhu ;; Keywords: PGP MIME MML diff --git a/lisp/nndoc.el b/lisp/nndoc.el index 4d1fa8c..30b800f 100644 --- a/lisp/nndoc.el +++ b/lisp/nndoc.el @@ -1,5 +1,5 @@ ;;; nndoc.el --- single file access for Gnus -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001 +;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen diff --git a/lisp/nnheader.el b/lisp/nnheader.el index 34143f6..4cf477a 100644 --- a/lisp/nnheader.el +++ b/lisp/nnheader.el @@ -1,7 +1,7 @@ ;;; nnheader.el --- header access macros for Semi-gnus and its backends ;; Copyright (C) 1987, 1988, 1989, 1990, 1993, 1994, 1995, 1996, -;; 1997, 1998, 2000, 2001 +;; 1997, 1998, 2000, 2001, 2002 ;; Free Software Foundation, Inc. ;; Author: Masanobu UMEDA diff --git a/lisp/nnkiboze.el b/lisp/nnkiboze.el index 33e1242..710163f 100644 --- a/lisp/nnkiboze.el +++ b/lisp/nnkiboze.el @@ -1,6 +1,6 @@ ;;; nnkiboze.el --- select virtual news access for Gnus -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000 +;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2002 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen