2002-01-29 Katsumi Yamaoka <yamaoka@jpl.org>
+ * lisp/message.el (message-cite-prefix-regexp): Fix the regexp.
+
* lisp/gnus-sum.el (gnus-mime-extract-message/rfc822): New
implementation.
2002-01-29 ShengHuo ZHU <zsh@cs.rochester.edu>
+ * 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 <karl@charcoal.com>
+
+ * 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 <zsh@cs.rochester.edu>
+
* gnus-uu.el (gnus-uu-expand-numbers): Ignore errors when
replacing numbers.
(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 <zsh@cs.rochester.edu>
(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.
;;; 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 <larsi@gnus.org>
(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."
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))
(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)
(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
(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
(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
(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)))
(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)))
(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")
(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$")
: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)
;;; 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))
;;; 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 <larsi@gnus.org>
;; MORIOKA Tomohiko <morioka@jaist.ac.jp>
;;; 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 <zsh@cs.rochester.edu>
;; Keywords: postscript uudecode binhex shar forward gnatsweb pgp
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)
;;; 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 <simon@josefsson.org>
;; This file is not part of GNU Emacs, but the same permissions apply.
;;; 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 <zsh@cs.rochester.edu>
;; Keywords: PGP MIME MML
;;; 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 <larsi@gnus.org>
;;; 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 <umerin@flab.flab.fujitsu.junet>
;;; 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 <larsi@gnus.org>