From: yamaoka Date: Mon, 19 Feb 2001 00:27:06 +0000 (+0000) Subject: Synch with Oort Gnus. X-Git-Tag: t-gnus-6_15_0-09-quimby~24 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef7d0438f42ad8d97b45e36880c5f05abe45ca0c;p=elisp%2Fgnus.git- Synch with Oort Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9034332..e14c8f1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,32 @@ +2001-02-17 Paul Jarc + Committed by ShengHuo ZHU + + * message.el (message-get-reply-headers): Fix bug with + Mail-Followup-To/to-address interaction. + +2001-02-17 13:00:00 ShengHuo ZHU + + * gnus-msg.el (gnus-configure-posting-styles): Match header in + gnus-article-copy. + +2001-02-16 22:00:00 ShengHuo ZHU + + * message.el (message-do-send-housekeeping): Rename to a better + name. + +2001-02-16 18:00:00 ShengHuo ZHU + + * message.el (message-cancel-news): Check article first, then ask + yes or no. + +2001-02-16 14:00:00 ShengHuo ZHU + + * mm-uu.el (mm-uu-type-alist): Add emacs-sources. + +2001-02-16 11:00:00 ShengHuo ZHU + + * gnus-range.el (gnus-range-normalize): New function. + 2001-02-15 NAGY Andras * imap.el (imap-gssapi-open): Set imap-c-l-s-first. diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index 927637e..85366c2 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -1384,9 +1384,11 @@ this is a reply." ;; Regexp string match on the group name. (string-match match group)) ((eq match 'header) - (let ((header (message-fetch-field (pop style)))) - (and header - (string-match (pop style) header)))) + (and (gnus-buffer-live-p gnus-article-copy) + (with-current-buffer gnus-article-copy + (let ((header (message-fetch-field (pop style)))) + (and header + (string-match (pop style) header)))))) ((or (symbolp match) (gnus-functionp match)) (cond diff --git a/lisp/gnus-range.el b/lisp/gnus-range.el index 223a32e..45855d9 100644 --- a/lisp/gnus-range.el +++ b/lisp/gnus-range.el @@ -30,6 +30,11 @@ ;;; List and range functions +(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)) + (defun gnus-last-element (list) "Return last element of LIST." (while (cdr list) diff --git a/lisp/message.el b/lisp/message.el index 6ec6b2c..628ae78 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -4508,9 +4508,25 @@ than 988 characters long, and if they are not, trim them until they are." ;; Rename the buffer. (if message-send-rename-function (funcall message-send-rename-function) - (when (string-match "\\`\\*\\(unsent \\)?" (buffer-name)) - (rename-buffer - (concat "*sent " (substring (buffer-name) (match-end 0))) t))) + (when (string-match "\\`\\*\\(sent \\|unsent \\)?\\(.+\\)\\*[^\\*]*" + (buffer-name)) + (let ((name (match-string 2 (buffer-name))) + to group) + (if (not (or (string-equal name "mail") + (string-equal name "news"))) + (setq name (concat "*sent " name "*")) + (setq to (message-fetch-field "to")) + (setq group (message-fetch-field "newsgroups")) + (setq name + (cond + (to (concat "*sent mail to " + (or (car (mail-extract-address-components to)) + to) "*")) + ((and group (not (string= group ""))) + (concat "*sent news on " group "*")) + (t "*sent mail*")))) + (unless (string-equal name (buffer-name)) + (rename-buffer name t))))) ;; Push the current buffer onto the list. (when message-max-buffers (setq message-buffer-list @@ -4762,8 +4778,10 @@ that further discussion should take place only in " "that mailing list") "."))) (setq mft nil)) - (if (or (not wide) - to-address) + (if (and (or (not message-use-followup-to) + (not mft)) + (or (not wide) + to-address)) (progn (setq follow-to (list (cons 'To (or to-address mrt reply-to mft from)))) @@ -5063,29 +5081,28 @@ If ARG, allow editing of the cancellation message." (interactive "P") (unless (message-news-p) (error "This is not a news article; canceling is impossible")) - (when (yes-or-no-p "Do you really want to cancel this article? ") - (let (from newsgroups message-id distribution buf sender) - (save-excursion - ;; Get header info from original article. - (save-restriction - (message-narrow-to-head-1) - (setq from (message-fetch-field "from") - sender (message-fetch-field "sender") - newsgroups (message-fetch-field "newsgroups") - message-id (message-fetch-field "message-id" t) - distribution (message-fetch-field "distribution"))) - ;; Make sure that this article was written by the user. - (unless (or (message-gnksa-enable-p 'cancel-messages) - (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")) + (let (from newsgroups message-id distribution buf sender) + (save-excursion + ;; Get header info from original article. + (save-restriction + (message-narrow-to-head-1) + (setq from (message-fetch-field "from") + sender (message-fetch-field "sender") + newsgroups (message-fetch-field "newsgroups") + message-id (message-fetch-field "message-id" t) + distribution (message-fetch-field "distribution"))) + ;; Make sure that this article was written by the user. + (unless (or (message-gnksa-enable-p 'cancel-messages) + (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")) + (when (yes-or-no-p "Do you really want to cancel this article? ") ;; Make control message. (if arg (message-news) @@ -5101,8 +5118,8 @@ If ARG, allow editing of the cancellation message." mail-header-separator "\n" message-cancel-message) (run-hooks 'message-cancel-hook) - (message "Canceling your article...") (unless arg + (message "Canceling your article...") (if (let ((message-syntax-checks 'dont-check-for-anything-just-trust-me) (message-encoding-buffer (current-buffer)) diff --git a/lisp/mm-uu.el b/lisp/mm-uu.el index f6f43ac..dd79e12 100644 --- a/lisp/mm-uu.el +++ b/lisp/mm-uu.el @@ -1,8 +1,8 @@ ;;; mm-uu.el -- Return uu stuff as mm handles -;; Copyright (c) 1998, 1999, 2000 Free Software Foundation, Inc. +;; Copyright (c) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. ;; Author: Shenghuo Zhu -;; Keywords: postscript uudecode binhex shar forward gnatsweb pgp +;; Keywords: postscript uudecode binhex shar forward gnatsweb pgp ;; This file is part of GNU Emacs. @@ -56,7 +56,7 @@ appear to be horribly slow . You can make Gnus use the external Unix decoder, such as hexbin." :type '(choice (item :tag "internal" binhex-decode-region) (item :tag "external" binhex-decode-region-external)) - :group 'gnus-article-mime) + :group 'gnus-article-mime) (defvar mm-uu-pgp-beginning-signature "^-----BEGIN PGP SIGNATURE-----") @@ -67,13 +67,16 @@ decoder, such as hexbin." "The default disposition of uu parts. This can be either \"inline\" or \"attachment\".") +(defvar mm-uu-emacs-sources-regexp "gnu\\.emacs\\.sources" + "The regexp of emacs sources groups.") + (defvar mm-uu-type-alist - '((postscript + '((postscript "^%!PS-" "^%%EOF$" mm-uu-postscript-extract nil) - (uu + (uu "^begin[ \t]+[0-7][0-7][0-7][ \t]+" "^end[ \t]*$" mm-uu-uu-extract @@ -84,12 +87,12 @@ This can be either \"inline\" or \"attachment\".") mm-uu-binhex-extract nil mm-uu-binhex-filename) - (shar + (shar "^#! */bin/sh" "^exit 0$" mm-uu-shar-extract) - (forward -;;; Thanks to Edward J. Sabol and + (forward +;;; Thanks to Edward J. Sabol and ;;; Peter von der Ah\'e "^-+ \\(Start of \\)?Forwarded message" "^-+ End \\(of \\)?forwarded message" @@ -117,13 +120,19 @@ This can be either \"inline\" or \"attachment\".") "^-----END PGP PUBLIC KEY BLOCK-----" mm-uu-pgp-key-extract mm-uu-gpg-key-skip-to-last - nil))) + nil) + (emacs-sources + "^;;;?[ \t]*[^ \t]+\\.el[ \t]*--" + "^;;;?[ \t]*\\([^ \t]+\\.el\\)[ \t]+ends here" + mm-uu-emacs-sources-extract + nil + mm-uu-emacs-sources-test))) (defcustom mm-uu-configure-list nil "A list of mm-uu configuration. To disable dissecting shar codes, for instance, add `(shar . disabled)' to this list." - :type `(repeat (cons + :type `(repeat (cons ,(cons 'choice (mapcar (lambda (entry) @@ -168,7 +177,7 @@ Return that buffer." (if symbol (set-default symbol value)) (setq mm-uu-beginning-regexp nil) (mapcar (lambda (entry) - (if (mm-uu-configure-p (mm-uu-type entry) 'disabled) + (if (mm-uu-configure-p (mm-uu-type entry) 'disabled) nil (setq mm-uu-beginning-regexp (concat mm-uu-beginning-regexp @@ -206,8 +215,24 @@ Return that buffer." (mm-make-handle (mm-uu-copy-to-buffer start-point end-point) '("application/postscript"))) +(defun mm-uu-emacs-sources-extract () + (mm-make-handle (mm-uu-copy-to-buffer start-point end-point) + '("application/emacs-lisp") + nil nil + (list mm-dissect-disposition + (cons 'filename file-name)))) + +(eval-when-compile + (defvar gnus-newsgroup-name)) + +(defun mm-uu-emacs-sources-test () + (setq file-name (match-string 1)) + (and gnus-newsgroup-name + mm-uu-emacs-sources-regexp + (string-match mm-uu-emacs-sources-regexp gnus-newsgroup-name))) + (defun mm-uu-forward-extract () - (mm-make-handle (mm-uu-copy-to-buffer + (mm-make-handle (mm-uu-copy-to-buffer (progn (goto-char start-point) (forward-line) (point)) (progn (goto-char end-point) (forward-line -1) (point))) '("message/rfc822" (charset . gnus-decoded)))) @@ -258,6 +283,9 @@ Return that buffer." ((eq mm-verify-option 'known) t) (t (y-or-n-p "Verify pgp signed part?"))))) +(eval-when-compile + (defvar gnus-newsgroup-charset)) + (defun mm-uu-pgp-signed-extract-1 (handles ctl) (let ((buf (mm-uu-copy-to-buffer (point-min) (point-max)))) (with-current-buffer buf @@ -269,7 +297,7 @@ Return that buffer." (funcall (mml2015-clear-verify-function)))) (when (and mml2015-use (null (mml2015-clear-verify-function))) (mm-set-handle-multipart-parameter - mm-security-handle 'gnus-details + mm-security-handle 'gnus-details (format "Clear verification not supported by `%s'.\n" mml2015-use)))) (goto-char (point-min)) (if (search-forward "\n\n" nil t) @@ -284,7 +312,7 @@ Return that buffer." (defun mm-uu-pgp-signed-extract () (let ((mm-security-handle (list (format "multipart/signed")))) - (mm-set-handle-multipart-parameter + (mm-set-handle-multipart-parameter mm-security-handle 'protocol "application/x-gnus-pgp-signature") (save-restriction (narrow-to-region start-point end-point) @@ -292,7 +320,7 @@ Return that buffer." (list 'buffer (mm-uu-copy-to-buffer)) (car mm-security-handle)) (setcdr mm-security-handle - (mm-uu-pgp-signed-extract-1 nil + (mm-uu-pgp-signed-extract-1 nil mm-security-handle))) mm-security-handle)) @@ -318,7 +346,7 @@ Return that buffer." (defun mm-uu-pgp-encrypted-extract () (let ((mm-security-handle (list (format "multipart/encrypted")))) - (mm-set-handle-multipart-parameter + (mm-set-handle-multipart-parameter mm-security-handle 'protocol "application/x-gnus-pgp-encrypted") (save-restriction (narrow-to-region start-point end-point) @@ -326,7 +354,7 @@ Return that buffer." (list 'buffer (mm-uu-copy-to-buffer)) (car mm-security-handle)) (setcdr mm-security-handle - (mm-uu-pgp-encrypted-extract-1 nil + (mm-uu-pgp-encrypted-extract-1 nil mm-security-handle))) mm-security-handle)) @@ -351,11 +379,11 @@ Return that buffer." (defun mm-uu-dissect () "Dissect the current buffer and return a list of uu handles." (let ((case-fold-search t) - text-start start-point end-point file-name result + text-start start-point end-point file-name result text-plain-type entry func) (save-excursion (goto-char (point-min)) - (cond + (cond ((looking-at "\n") (forward-line)) ((search-forward "\n\n" nil t) @@ -370,7 +398,7 @@ Return that buffer." (let ((alist mm-uu-type-alist) (beginning-regexp (match-string 0))) (while (not entry) - (if (string-match (mm-uu-beginning-regexp (car alist)) + (if (string-match (mm-uu-beginning-regexp (car alist)) beginning-regexp) (setq entry (car alist)) (pop alist)))) diff --git a/texi/ChangeLog b/texi/ChangeLog index 54fbd12..f40ff95 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,11 @@ +2001-02-17 13:00:00 ShengHuo ZHU + + * gnus.texi (Posting Styles): Doc fix. + +2001-02-16 Simon Josefsson + + * gnus.texi (Optional Backend Functions): Fix case. + 2001-02-14 Kai Gro,A_(Bjohann * gnus.texi (Unread Articles): Say that Gnus itself never expires diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index 657a346..0471cb8 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -9459,13 +9459,13 @@ Gnus $B$O30$X=P$F9T$/A4$F$N%a%C%;!<%8$K!"0l$D$+$=$l0J>e$N$=$N%5!<%P!<$N%0(B $B%@!<(B @samp{What me?} $B$r;}$A$^$9!#(B $B$=$l$>$l$NMM<0$N:G=i$NMWAG$O(B @code{$B9gCW(B} (match) $B$H8F$P$l$^$9!#$b$7$=$l(B -$B$,J8;zNs$G$"$l$P!"(Bgnus $B$O$=$l$r%0%k!<%WL>$K@55,I=8=$H$7$F9gCWA`:n$r9T$$(B -$B$^$9!#%7%s%\%k(B @code{header} $B$G$"$l$P!"(Bgnus $B$O$=$N9gCW$NCf$NH$5$l$^$9!#$=$l$,%j%9%H$G$"$l$P!"$=$N%j%9(B -$B%H$,(B @code{$BI>2A(B} $B$5$l$^$9!#$I$N>l9g$G$b!"$3$l$,(B @code{nil}$B$G$J$$CM$r5"$;(B -$B$P!"MM<0$O(B @code{$B9gCW$7$?(B} $B$H8@$$$^$9!#(B +$B$,J8;zNs$G$"$l$P!"(Bgnus $B$O$=$l$r%0%k!<%WL>$K@55,I=858=$H$7$F9gCWA`:n$r9T(B +$B$$$^$9!#%7%s%\%k(B @code{header} $B$G$"$l$P!"(Bgnus $B$O85$N5-;v$NCf$+$i$=$N9gCW(B +$B$NCf$NH$5$l$^$9!#$=$l$,%j%9(B +$B%H$G$"$l$P!"$=$N%j%9%H$,(B @code{$BI>2A(B} $B$5$l$^$9!#$I$N>l9g$G$b!"$3$l(B +$B$,(B @code{nil}$B$G$J$$CM$r5"$;$P!"MM<0$O(B @code{$B9gCW$7$?(B} $B$H8@$$$^$9!#(B $B$=$l$>$l$NMM<0$OG$0U$NNL$N(B @dfn{$BB0@-(B} $B$r;}$D;v$,$G$-$^$9!#$=$l$>$l$NB0@-(B $B$O(B @code{(@var{name} . @var{value})} $B$NBP$K$h$j@.$jN)$C$F$$$^$9!#B0@-L>(B @@ -9504,7 +9504,7 @@ Gnus $B$O30$X=P$F9T$/A4$F$N%a%C%;!<%8$K!"0l$D$+$=$l0J>e$N$=$N%5!<%P!<$N%0(B (signature my-quote-randomizer)) ((message-news-p) (signature my-news-signature)) - (header "From\\|To" "larsi.*org" + (header "to" "larsi.*org" (Organization "Somewhere, Inc.")) ((posting-from-work-p) (signature-file "~/.work-signature") diff --git a/texi/gnus.texi b/texi/gnus.texi index d182aa8..ac0271e 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -9900,13 +9900,13 @@ signature and the @samp{What me?} @code{Organization} header. The first element in each style is called the @code{match}. If it's a string, then Gnus will try to regexp match it against the group name. -If it is the symbol @code{header}, then Gnus will look for header that -match the next element in the match, and compare that to the last header -in the match. If it's a function symbol, that function will be called -with no arguments. If it's a variable symbol, then the variable will be -referenced. If it's a list, then that list will be @code{eval}ed. In -any case, if this returns a non-@code{nil} value, then the style is said -to @dfn{match}. +If it is the symbol @code{header}, then Gnus will look for header (the +next element in the match) in the original article , and compare that to +the last regexp in the match. If it's a function symbol, that function +will be called with no arguments. If it's a variable symbol, then the +variable will be referenced. If it's a list, then that list will be +@code{eval}ed. In any case, if this returns a non-@code{nil} value, +then the style is said to @dfn{match}. Each style may contain a arbitrary amount of @dfn{attributes}. Each attribute consists of a @code{(@var{name} . @var{value})} pair. The @@ -9947,7 +9947,7 @@ So here's a new example: (signature my-quote-randomizer)) ((message-news-p) (signature my-news-signature)) - (header "From\\|To" "larsi.*org" + (header "to" "larsi.*org" (Organization "Somewhere, Inc.")) ((posting-from-work-p) (signature-file "~/.work-signature") @@ -21246,11 +21246,11 @@ ACTION is a list of mark setting requests, having this format: (RANGE ACTION MARK) @end example -Range is a range of articles you wish to update marks on. Action is +RANGE is a range of articles you wish to update marks on. ACTION is @code{set}, @code{add} or @code{del}, respectively used for removing all existing marks and setting them as specified, adding (preserving the marks not mentioned) mark and removing (preserving the marks not -mentioned) marks. Mark is a list of marks; where each mark is a symbol. +mentioned) marks. MARK is a list of marks; where each mark is a symbol. Currently used marks are @code{read}, @code{tick}, @code{reply}, @code{expire}, @code{killed}, @code{dormant}, @code{save}, @code{download} and @code{unsend}, but your backend should, if possible,