+2005-10-04 Reiner Steib <Reiner.Steib@gmx.de>
+
+ * 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 <huber@alum.wpi.edu>
+
+ * message.el (message-make-expires-date): New function.
+
2005-10-04 Katsumi Yamaoka <yamaoka@jpl.org>
* Makefile.in (list-installed-shadows): New entry.
(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)
;;; 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.
(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"
;; ["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
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: <Old Subject>)\"
C-c C-f x crossposting with FollowUp-To header and note in body
(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)
rhs ace address)
(when field
(dolist (rhs
- (message-remove-duplicates
+ (mm-delete-duplicates
(mapcar (lambda (rhs) (or (cadr (split-string rhs "@")) ""))
(mapcar 'downcase
(mapcar
: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"
'((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
;; 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.
(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)
(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)
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...