From: yamaoka Date: Tue, 4 Oct 2005 22:06:26 +0000 (+0000) Subject: Synch to No Gnus 200510041632. X-Git-Tag: t-gnus-6_17_4-quimby-~322 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a9d37383bf654e88ae987c14a0f783b7f42eccf5;p=elisp%2Fgnus.git- Synch to No Gnus 200510041632. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 56b2c71..4b9d1f2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,36 @@ +2005-10-04 Reiner Steib + + * mm-uu.el (mm-uu-verbatim-marks-extract, mm-uu-latex-extract): + Rename x-gnus-verbatim to x-verbatim. + (mm-uu-type-alist): Fix regexp for verbatim-marks. + + * mm-decode.el (mm-automatic-display): Rename x-gnus-verbatim to + x-verbatim. + + * mm-url.el (mm-url-predefined-programs): Add switches for curl. + + * gnus-util.el (gnus-remove-duplicates): Remove. + + * nnmail.el (nnmail-article-group): Use mm-delete-duplicates + instead of gnus-remove-duplicates. + + * message.el (message-remove-duplicates): Remove. + (message-idna-to-ascii-rhs-1): Use mm-delete-duplicates instead of + message-remove-duplicates. + + * mm-util.el (mm-delete-duplicates): Use `delete-dups' if + available, else use implementation from `delete-dups'. + + * message.el (message-insert-expires): New function. + (message-mode-map): Add key binding. + (message-mode-field-menu): Add menu entry. + (message-mode): Document it. + (message-make-expires-date): Use `message-make-date'. + +2005-10-04 Josh Huber + + * message.el (message-make-expires-date): New function. + 2005-10-04 Katsumi Yamaoka * Makefile.in (list-installed-shadows): New entry. diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index c872f23..8a65702 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -1055,14 +1055,6 @@ This function saves the current buffer." (set-buffer gnus-group-buffer) (eq major-mode 'gnus-group-mode)))) -(defun gnus-remove-duplicates (list) - (let (new) - (while list - (or (member (car list) new) - (setq new (cons (car list) new))) - (setq list (cdr list))) - (nreverse new))) - (defun gnus-remove-if (predicate list) "Return a copy of LIST with all items satisfying PREDICATE removed." (let (out) diff --git a/lisp/message.el b/lisp/message.el index 887f07f..bf8dd17 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -2314,14 +2314,6 @@ With prefix-argument just set Follow-Up, don't cross-post." ;;; End of functions adopted from `message-utils.el'. -(defun message-remove-duplicates (list) - (let (new) - (while list - (or (member (car list) new) - (setq new (cons (car list) new))) - (setq list (cdr list))) - (nreverse new))) - (defun message-remove-header (header &optional is-regexp first reverse) "Remove HEADER in the narrowed buffer. If IS-REGEXP, HEADER is a regular expression. @@ -2541,6 +2533,7 @@ Point is left at the beginning of the narrowed-to region." (define-key message-mode-map "\C-c\C-fw" 'message-insert-wide-reply) (define-key message-mode-map "\C-c\C-n" 'message-insert-newsgroups) (define-key message-mode-map "\C-c\C-l" 'message-to-list-only) + (define-key message-mode-map "\C-c\C-f\C-e" 'message-insert-expires) (define-key message-mode-map "\C-c\C-u" 'message-insert-or-toggle-importance) (define-key message-mode-map "\C-c\M-n" @@ -2652,7 +2645,8 @@ Point is left at the beginning of the narrowed-to region." ;; ["Followup-To (with note in body)" message-cross-post-followup-to t] ["Crosspost / Followup-To..." message-cross-post-followup-to t] ["Distribution" message-goto-distribution t] - ["X-No-Archive:" message-add-archive-header t ] + ["Expires" message-insert-expires t ] + ["X-No-Archive" message-add-archive-header t ] "----" ;; (typical) mailing-lists stuff ["Fetch To" message-insert-to @@ -2760,6 +2754,7 @@ C-c C-f move to a header field (and create it if there isn't): C-c C-f C-f move to Followup-To C-c C-f C-m move to Mail-Followup-To C-c C-f c move to Mail-Copies-To + C-c C-f C-e move to Expires C-c C-f C-i cycle through Importance values C-c C-f s change subject and append \"(was: )\" C-c C-f x crossposting with FollowUp-To header and note in body @@ -5276,6 +5271,22 @@ If NOW, use that time instead." (concat "Re: " (message-strip-subject-re subject))) (t subject))) +(defun message-insert-expires (days) + "Insert the Expires header. Expiry in DAYS days." + (interactive "NExpire article in how many days? ") + (save-excursion + (message-position-on-field "Expires" "X-Draft-From") + (insert (message-make-expires-date days)))) + +(defun message-make-expires-date (days) + "Make date string for the Expires header. Expiry in DAYS days. + +In posting styles use `(\"Expires\" (make-expires-date 30))'." + (let* ((cur (decode-time (current-time))) + (nday (+ days (nth 3 cur)))) + (setf (nth 3 cur) nday) + (message-make-date (apply 'encode-time cur)))) + (defun message-make-message-id () "Make a unique Message-ID." (concat "<" (message-unique-id) @@ -5633,7 +5644,7 @@ subscribed address (and not the additional To and Cc header contents)." rhs ace address) (when field (dolist (rhs - (message-remove-duplicates + (mm-delete-duplicates (mapcar (lambda (rhs) (or (cadr (split-string rhs "@")) "")) (mapcar 'downcase (mapcar diff --git a/lisp/mm-decode.el b/lisp/mm-decode.el index ba0e6a4..d87f104 100644 --- a/lisp/mm-decode.el +++ b/lisp/mm-decode.el @@ -296,8 +296,7 @@ when selecting a different article." :group 'mime-display) (defcustom mm-automatic-display - '("text/plain" "text/enriched" "text/richtext" "text/html" - "text/x-gnus-verbatim" + '("text/plain" "text/enriched" "text/richtext" "text/html" "text/x-verbatim" "text/x-vcard" "image/.*" "message/delivery-status" "multipart/.*" "message/rfc822" "text/x-patch" "text/dns" "application/pgp-signature" "application/emacs-lisp" "application/x-emacs-lisp" diff --git a/lisp/mm-url.el b/lisp/mm-url.el index fe52b5d..bcbc6d2 100644 --- a/lisp/mm-url.el +++ b/lisp/mm-url.el @@ -64,7 +64,7 @@ '((wget "wget" "--user-agent=mm-url" "-q" "-O" "-") (w3m "w3m" "-dump_source") (lynx "lynx" "-source") - (curl "curl" "--silent"))) + (curl "curl" "--silent" "--user-agent mm-url" "--location"))) (defcustom mm-url-program (cond diff --git a/lisp/mm-util.el b/lisp/mm-util.el index aa9c838..f7330e5 100644 --- a/lisp/mm-util.el +++ b/lisp/mm-util.el @@ -552,14 +552,21 @@ If the charset is `composition', return the actual one." ;; This is for XEmacs. (mm-mule-charset-to-mime-charset charset))) -(defun mm-delete-duplicates (list) - "Simple substitute for CL `delete-duplicates', testing with `equal'." - (let (result head) - (while list - (setq head (car list)) - (setq list (delete head list)) - (setq result (cons head result))) - (nreverse result))) +(if (fboundp 'delete-dups) + (defalias 'mm-delete-duplicates 'delete-dups) + (defun mm-delete-duplicates (list) + "Destructively remove `equal' duplicates from LIST. +Store the result in LIST and return it. LIST must be a proper list. +Of several `equal' occurrences of an element in LIST, the first +one is kept. + +This is a compatibility function for Emacsen without `delete-dups'." + ;; Code from `subr.el' in Emacs 22: + (let ((tail list)) + (while tail + (setcdr tail (delete (car tail) (cdr tail))) + (setq tail (cdr tail)))) + list)) ;; Fixme: This is used in places when it should be testing the ;; default multibyteness. See mm-default-multibyte-p. diff --git a/lisp/mm-uu.el b/lisp/mm-uu.el index 4675e3a..3194846 100644 --- a/lisp/mm-uu.el +++ b/lisp/mm-uu.el @@ -167,7 +167,7 @@ This can be either \"inline\" or \"attachment\".") (verbatim-marks ;; slrn-style verbatim marks, see ;; http://www.slrn.org/manual/slrn-manual-6.html#ss6.81 - "^#v\\+$" + "^#v\\+" "^#v\\-$" mm-uu-verbatim-marks-extract nil) @@ -312,13 +312,13 @@ apply the face `mm-uu-extract'." (progn (goto-char start-point) (forward-line) (point)) (progn (goto-char end-point) (forward-line -1) (point)) t) - '("text/x-gnus-verbatim" (charset . gnus-decoded)))) + '("text/x-verbatim" (charset . gnus-decoded)))) (defun mm-uu-latex-extract () (mm-make-handle (mm-uu-copy-to-buffer start-point end-point t) ;; application/x-tex? - '("text/x-gnus-verbatim" (charset . gnus-decoded)))) + '("text/x-verbatim" (charset . gnus-decoded)))) (defun mm-uu-emacs-sources-extract () (mm-make-handle (mm-uu-copy-to-buffer start-point end-point) diff --git a/lisp/nnmail.el b/lisp/nnmail.el index c22fbcf..cf3f794 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -1140,7 +1140,7 @@ FUNC will be called with the group name to determine the article number." 5 "Error in `nnmail-split-methods'; using `bogus' mail group") (sit-for 1) '("bogus"))))) - (setq split (gnus-remove-duplicates split)) + (setq split (mm-delete-duplicates split)) ;; The article may be "cross-posted" to `junk'. What ;; to do? Just remove the `junk' spec. Don't really ;; see anything else to do...