+1998-08-28 Shuhei KOBAYASHI <shuhei-k@jaist.ac.jp>
+
+ * lisp/gnus-i18n.el (gnus-set-summary-default-charset): Try
+ "qualified" newsgroup name first.
+
+1998-08-28 Shuhei KOBAYASHI <shuhei-k@jaist.ac.jp>
+
+ * lisp/gnus-i18n.el (gnus-set-summary-default-charset): Match
+ "real" newsgroup name; strip "backend+server" prefix.
+
+ * lisp/message.el (message-make-in-reply-to):
+ Use `std11-extract-address-components'.
+ (message-use-mail-reply-to): Doc fix.
+
1998-08-28 Katsumi Yamaoka <yamaoka@jpl.org>
* lisp/message.el (message-make-user-agent): New function.
;;; Code:
+(require 'gnus-sum)
+(require 'gnus-util)
+
;;; @ newsgroup default charset
;;;
It is specified by variable `gnus-newsgroup-default-charset-alist'
\(cf. function `gnus-set-newsgroup-default-charset')."
(if (buffer-live-p gnus-summary-buffer)
- (let ((charset
- (catch 'found
- (let ((group
- (save-excursion
- (set-buffer gnus-summary-buffer)
- gnus-newsgroup-name))
- (alist gnus-newsgroup-default-charset-alist))
- (while alist
- (let ((pair (car alist)))
- (if (string-match (car pair) group)
- (throw 'found (cdr pair))
- ))
- (setq alist (cdr alist)))
- ))))
+ (let* ((qgroup (save-excursion
+ (set-buffer gnus-summary-buffer)
+ gnus-newsgroup-name))
+ (rgroup (gnus-group-real-name qgroup))
+ alist pair charset)
+ (setq charset (catch 'found
+ ;; First, use "qualified" newsgroup name.
+ (setq alist gnus-newsgroup-default-charset-alist)
+ (while (setq pair (car alist))
+ (if (string-match (car pair) qgroup)
+ (throw 'found (cdr pair)))
+ (setq alist (cdr alist)))
+ ;; Next, try "real" newsgroup name.
+ (setq alist gnus-newsgroup-default-charset-alist)
+ (while (setq pair (car alist))
+ (if (string-match (car pair) rgroup)
+ (throw 'found (cdr pair)))
+ (setq alist (cdr alist)))))
(if charset
- (progn
- (save-excursion
- (set-buffer gnus-summary-buffer)
- (make-local-variable 'default-mime-charset)
- (setq default-mime-charset charset))
- (make-local-variable 'default-mime-charset)
- (setq default-mime-charset charset))
+ (progn
+ (save-excursion
+ (set-buffer gnus-summary-buffer)
+ (make-local-variable 'default-mime-charset)
+ (setq default-mime-charset charset))
+ (make-local-variable 'default-mime-charset)
+ (setq default-mime-charset charset))
(kill-local-variable 'default-mime-charset)))))
;; This function parses the FORMAT string with the help of the
;; SPEC-ALIST and returns a list that can be eval'ed to return a
;; string.
- (let (max-width
+ (let ((xemacs-mule-p (and gnus-xemacs (featurep 'mule)))
+ max-width
spec flist fstring elem result dontinsert user-defined
type value pad-width spec-beg cut-width ignore-value
- tilde-form tilde elem-type
- (xemacs-mule-p (and gnus-xemacs (featurep 'mule))))
+ tilde-form tilde elem-type)
(save-excursion
(gnus-set-work-buffer)
(insert format)
;; Copyright (C) 1996,97,98 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
-;; MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;; Shuhei KOBAYASHI <shuhei-k@jaist.ac.jp>
-;; Keiichi Suzuki <kei-suzu@mail.wbs.ne.jp>
+;; MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;; Shuhei KOBAYASHI <shuhei-k@jaist.ac.jp>
+;; Keiichi Suzuki <kei-suzu@mail.wbs.ne.jp>
;; Keywords: mail, news, MIME
;; This file is part of GNU Emacs.
(Lines)
(Expires)
(Message-ID)
- (References . message-fill-references)
+ ;; (References . message-shorten-references)
+ (References . message-fill-header)
(User-Agent))
"Alist used for formatting headers.")
(special-display-regexps special-display-regexps)
(same-window-buffer-names same-window-buffer-names)
(same-window-regexps same-window-regexps)
- (buffer (get-buffer name)))
+ (buffer (get-buffer name))
+ (cur (current-buffer)))
(if (or (and (featurep 'xemacs)
(not (eq 'tty (device-type))))
- window-system)
+ window-system
+ (>= emacs-major-version 20))
(when message-use-multi-frames
(setq pop-up-frames t
special-display-buffer-names nil
This is done simply by taking the old article and adding a Supersedes
header line with the old Message-ID."
(interactive)
- (let ((cur (current-buffer)))
+ (let ((cur (current-buffer))
+ (sender (message-fetch-field "sender"))
+ (from (message-fetch-field "from")))
;; Check whether the user owns the article that is to be superseded.
- (unless (string-equal
- (downcase (or (message-fetch-field "sender")
- (cadr (std11-extract-address-components
- (message-fetch-field "from")))))
- (downcase (message-make-sender)))
+ (unless (or (and sender
+ (string-equal
+ (downcase sender)
+ (downcase (message-make-sender))))
+ (string-equal
+ (downcase (cadr (std11-extract-address-components from)))
+ (downcase (cadr (std11-extract-address-components
+ (message-make-from))))))
(error "This article is not yours"))
;; Get a normal message buffer.
(message-pop-to-buffer (message-buffer-name "supersede"))
(run-hooks 'mime-edit-exit-hook)
))
+;;; XXX: currently broken; message-yank-original resets message-reply-buffer.
(defun message-mime-insert-article (&optional message)
(interactive)
(let ((message-cite-function 'mime-edit-inserted-message-filter)