From: yamaoka Date: Wed, 4 Jun 2003 02:42:11 +0000 (+0000) Subject: Synch to Gnus 200306040203. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=129ce83296f185c75c179fb1571ad592890484af;p=elisp%2Fgnus.git- Synch to Gnus 200306040203. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cca493e..0dbec0d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,25 @@ +2003-06-04 Jesper Harder + + * mml1991.el (mml1991-pgg-sign): Insert pgg output as unibyte. + From: Ivan Boldyrev (tiny + change) + +2003-06-03 Dave Love + + * gnus-soup.el (gnus-soup-send-packet): Don't use + message-functionp. + + * gnus.el (gnus-agent-cache): Doc fix. + (gnus-other-frame): Quote lambda used as hook. + + * message.el: Doc fixes. + (message-functionp): Deleted. Callers changed. + (message-fix-before-sending): Highlight with overlays. Clarify + `illegible text' messages. + (rmail-enable-mime-composing, gnus-message-group-art): Defvar when + compiling. + (gnus-find-method-for-group, nnvirtual-find-group-art): Autoload. + 2003-06-03 Kai Gro,A_(Bjohann * nnmail.el (nnmail-split-fancy-match-partial-words): New user diff --git a/lisp/gnus-soup.el b/lisp/gnus-soup.el index 59b641d..18af9de 100644 --- a/lisp/gnus-soup.el +++ b/lisp/gnus-soup.el @@ -550,7 +550,7 @@ Return whether the unpacking was successful." (sit-for 1) (let ((message-syntax-checks 'dont-check-for-anything-just-trust-me) - (method (if (message-functionp message-post-method) + (method (if (functionp message-post-method) (funcall message-post-method) message-post-method)) result) diff --git a/lisp/gnus.el b/lisp/gnus.el index af08a43..e664912 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -2175,9 +2175,10 @@ face." "Whether Gnus is plugged or not.") (defcustom gnus-agent-cache t - "Controls use of the agent cache while plugged. When set, Gnus will prefer -using the locally stored content rather than re-fetching it from the server. -You also need to enable `gnus-agent' for this to have any affect." + "Controls use of the agent cache while plugged. +When set, Gnus will prefer using the locally stored content rather +than re-fetching it from the server. You also need to enable +`gnus-agent' for this to have any affect." :version "21.3" :group 'gnus-agent :type 'boolean) @@ -2190,6 +2191,7 @@ covered by that variable." :type 'symbol :group 'gnus-charset) +;; Fixme: Doc reference to agent. (defcustom gnus-agent t "Whether we want to use the Gnus agent or not. @@ -3912,11 +3914,11 @@ current display is used." (switch-to-buffer gnus-group-buffer) (funcall gnus-other-frame-function arg) (add-hook 'gnus-exit-gnus-hook - (lambda nil - (when (and (frame-live-p gnus-other-frame-object) - (cdr (frame-list))) - (delete-frame gnus-other-frame-object)) - (setq gnus-other-frame-object nil))))))) + '(lambda nil + (when (and (frame-live-p gnus-other-frame-object) + (cdr (frame-list))) + (delete-frame gnus-other-frame-object)) + (setq gnus-other-frame-object nil))))))) ;;;###autoload (defun gnus (&optional arg dont-connect slave) diff --git a/lisp/message.el b/lisp/message.el index d6e2ad6..431da3f 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -39,6 +39,7 @@ (eval-when-compile (require 'cl) (require 'smtp) + (defvar gnus-message-group-art) (defvar gnus-list-identifiers)) ; gnus-sum is required where necessary (eval-and-compile (if (boundp 'MULE) @@ -65,7 +66,9 @@ (require 'rfc822) (eval-and-compile (autoload 'sha1 "sha1-el") - (autoload 'customize-save-variable "cus-edit"));; for Mule 2. + (autoload 'gnus-find-method-for-group "gnus") + (autoload 'nnvirtual-find-group-art "nnvirtual") + (autoload 'customize-save-variable "cus-edit")) ;; for Mule 2. (defgroup message '((user-mail-address custom-variable) (user-full-name custom-variable)) @@ -345,7 +348,8 @@ Checks include `subject-cmsg', `multiple-headers', `sendsys', `approved', `sender', `empty', `empty-headers', `message-id', `from', `subject', `shorten-followup-to', `existing-newsgroups', `buffer-file-name', `unchanged', `newsgroups', `reply-to', -'continuation-headers', and `long-header-lines'." +`continuation-headers', `long-header-lines', `invisible-text' and +`illegible-text'." :group 'message-news :type '(repeat sexp)) ; Fixme: improve this @@ -581,24 +585,27 @@ The provided functions are: (repeat :tag "List of functions" function))) (defcustom message-forward-as-mime t - "*If non-nil, forward messages as an inline/rfc822 MIME section. Otherwise, directly inline the old message in the forwarded message." + "*Non-nil means forward messages as an inline/rfc822 MIME section. +Otherwise, directly inline the old message in the forwarded message." :version "21.1" :group 'message-forwarding :type 'boolean) (defcustom message-forward-show-mml t - "*If non-nil, forward messages are shown as mml. Otherwise, forward messages are unchanged." + "*Non-nil means show forwarded messages as mml. +Otherwise, forwarded messages are unchanged." :version "21.1" :group 'message-forwarding :type 'boolean) (defcustom message-forward-before-signature t - "*If non-nil, put forwarded message before signature, else after." + "*Non-nil means put forwarded message before signature, else after." :group 'message-forwarding :type 'boolean) (defcustom message-wash-forwarded-subjects nil - "*If non-nil, try to remove as much old cruft as possible from the subject of messages before generating the new subject of a forward." + "*Non-nil means try to remove as much cruft as possible from the subject. +Done before generating the new subject of a forward." :group 'message-forwarding :type 'boolean) @@ -1828,12 +1835,6 @@ function `message-narrow-to-headers-or-head'." (mail-narrow-to-head) (message-fetch-field header)))) -(defun message-functionp (form) - "Return non-nil if FORM is funcallable." - (or (and (symbolp form) (fboundp form)) - (and (listp form) (eq (car form) 'lambda)) - (byte-code-function-p form))) - (defun message-strip-list-identifiers (subject) "Remove list identifiers in `gnus-list-identifiers' from string SUBJECT." (require 'gnus-sum) ; for gnus-list-identifiers @@ -2595,7 +2596,8 @@ M-RET `message-newline-and-reformat' (break the line and reformat)." (when (eq message-mail-alias-type 'abbrev) (if (fboundp 'mail-abbrevs-setup) (mail-abbrevs-setup) - (mail-aliases-setup))) + (if (fboundp 'mail-aliases-setup) ; warning avoidance + (mail-aliases-setup)))) (unless buffer-file-name (message-set-auto-save-file-name)) (set (make-local-variable 'indent-tabs-mode) nil)) ;No tabs for indentation. @@ -3016,7 +3018,7 @@ Prefix arg means justify as well." ((and (null message-signature) force) t) - ((message-functionp message-signature) + ((functionp message-signature) (funcall message-signature)) ((listp message-signature) (eval message-signature)) @@ -3759,9 +3761,10 @@ used to distinguish whether the invisible text is a MIME part or not." (dolist (point points) (add-text-properties point (1+ point) '(invisible nil intangible nil))))) - ;; Delete all invisible text except for the mime parts which might + ;; Make invisible text visible except for the mime parts which may ;; be inserted by the MIME-Edit. (message-check 'invisible-text + ;; FIXME T-gnus: It should also detect invisible overlays. (let (from (to (point-min)) mime-from mime-to hidden-start) @@ -3788,7 +3791,7 @@ used to distinguish whether the invisible text is a MIME part or not." (goto-char hidden-start) (set-window-start (selected-window) (gnus-point-at-bol)) (unless (yes-or-no-p - "Invisible text found and made visible; continue posting? ") + "Invisible text found and made visible; continue sending? ") (error "Invisible text found and made visible"))))) (message-check 'illegible-text (let ((mm-7bit-chars "\x20-\x7f\r\n\t\x7\x8\xb\xc\x1f\x1b") @@ -3799,36 +3802,38 @@ used to distinguish whether the invisible text is a MIME part or not." (when (let ((char (char-after))) (or (< (mm-char-int char) 128) (and (mm-multibyte-p) - (memq (char-charset char) - '(eight-bit-control eight-bit-graphic - control-1))))) - (add-text-properties (point) (1+ (point)) - '(font-lock-face highlight face highlight)) + (> (length (mm-find-mime-charset-region + (point) (point-max))) + 1)))) + (message-overlay-put (message-make-overlay (point) (1+ (point))) + 'face 'highlight) (setq found t)) (forward-char) (skip-chars-forward mm-7bit-chars)) (when found (setq choice (gnus-multiple-choice - "Illegible text found. Continue posting?" - '((?d "Remove and continue posting") - (?r "Replace with dots and continue posting") - (?i "Ignore and continue posting") + "Non-printable characters found. Continue sending?" + '((?d "Remove non-printable characters and send") + (?r "Replace non-printable characters with dots and send") + (?i "Ignore non-printable characters and send") (?e "Continue editing")))) (if (eq choice ?e) - (error "Illegible text found")) + (error "Non-printable characters")) (message-goto-body) (skip-chars-forward mm-7bit-chars) (while (not (eobp)) (when (let ((char (char-after))) (or (< (mm-char-int char) 128) (and (mm-multibyte-p) + ;; Fixme: Wrong for Emacs 22 and for things + ;; like undecable utf-8. Should at least + ;; use find-coding-systems-region. (memq (char-charset char) '(eight-bit-control eight-bit-graphic control-1))))) (if (eq choice ?i) - (remove-text-properties (point) (1+ (point)) - '(font-lock-face highlight face highlight)) + (message-kill-all-overlays) (delete-char 1) (when (eq choice ?r) (insert ".")))) @@ -3855,7 +3860,7 @@ used to distinguish whether the invisible text is a MIME part or not." (ignore-errors (cond ;; A simple function. - ((message-functionp (car actions)) + ((functionp (car actions)) (funcall (car actions))) ;; Something to be evaled. (t @@ -4285,7 +4290,7 @@ Otherwise, generate and save a value for `canlock-password' first." (defun message-send-news (&optional arg) (let* ((tembuf (message-generate-new-buffer-clone-locals " *message temp*")) (case-fold-search nil) - (method (if (message-functionp message-post-method) + (method (if (functionp message-post-method) (funcall message-post-method arg) message-post-method)) (newsgroups-field (save-restriction @@ -4531,7 +4536,7 @@ Otherwise, generate and save a value for `canlock-password' first." (if followup-to (concat newsgroups "," followup-to) newsgroups))) - (post-method (if (message-functionp message-post-method) + (post-method (if (functionp message-post-method) (funcall message-post-method) message-post-method)) ;; KLUDGE to handle nnvirtual groups. Doing this right @@ -5026,7 +5031,7 @@ If NOW, use that time instead." "Make an Organization header." (let* ((organization (when message-user-organization - (if (message-functionp message-user-organization) + (if (functionp message-user-organization) (funcall message-user-organization) message-user-organization)))) (with-temp-buffer @@ -5081,7 +5086,7 @@ If NOW, use that time instead." (defun message-make-distribution () "Make a Distribution header." (let ((orig-distribution (message-fetch-reply-field "distribution"))) - (cond ((message-functionp message-distribution-function) + (cond ((functionp message-distribution-function) (funcall message-distribution-function)) (t orig-distribution)))) @@ -5437,7 +5442,7 @@ Headers already prepared in the buffer are not modified." ;; is something that is nil, then we do not insert ;; this header. (setq header (cdr elem)) - (or (and (message-functionp (cdr elem)) + (or (and (functionp (cdr elem)) (funcall (cdr elem))) (and (boundp (cdr elem)) (symbol-value (cdr elem))))) @@ -5448,7 +5453,7 @@ Headers already prepared in the buffer are not modified." ;; this function. (or (and (stringp (cdr elem)) (cdr elem)) - (and (message-functionp (cdr elem)) + (and (functionp (cdr elem)) (funcall (cdr elem))))) ((and (boundp header) (symbol-value header)) @@ -5726,7 +5731,7 @@ than 988 characters long, and if they are not, trim them until they are." "*"))) ;; Check whether `message-generate-new-buffers' is a function, ;; and if so, call it. - ((message-functionp message-generate-new-buffers) + ((functionp message-generate-new-buffers) (funcall message-generate-new-buffers type to group)) ((eq message-generate-new-buffers 'unsent) (generate-new-buffer-name @@ -6194,11 +6199,11 @@ responses here are directed to other addresses."))) ;; Allow customizations to have their say. (if (not wide) ;; This is a regular reply. - (when (message-functionp message-reply-to-function) + (when (functionp message-reply-to-function) (save-excursion (setq follow-to (funcall message-reply-to-function)))) ;; This is a followup. - (when (message-functionp message-wide-reply-to-function) + (when (functionp message-wide-reply-to-function) (save-excursion (setq follow-to (funcall message-wide-reply-to-function))))) @@ -6262,7 +6267,7 @@ If TO-NEWSGROUPS, use that as the new Newsgroups line." followup-to distribution newsgroups gnus-warning posted-to) (save-restriction (message-narrow-to-head) - (when (message-functionp message-followup-to-function) + (when (functionp message-followup-to-function) (setq follow-to (funcall message-followup-to-function))) (setq from (message-fetch-field "from") @@ -6646,7 +6651,7 @@ the message." ;; Apply funcs in order, passing subject generated by previous ;; func to the next one. (while funcs - (when (message-functionp (car funcs)) + (when (functionp (car funcs)) (setq subject (funcall (car funcs) subject))) (setq funcs (cdr funcs))) subject)))) @@ -6704,9 +6709,12 @@ Optional NEWS will use news to forward instead of mail." (rmail-msg-restore-non-pruned-header))) (message-forward-make-body forward-buffer)) +(eval-when-compile (defvar rmail-enable-mime-composing)) + +;; Fixme: Should have defcustom. ;;;###autoload (defun message-insinuate-rmail () - "Let RMAIL uses message to forward." + "Let RMAIL use message to forward." (interactive) (setq rmail-enable-mime-composing t) (setq rmail-insert-mime-forwarded-message-function @@ -6918,6 +6926,10 @@ which specify the range to operate on." (defalias 'message-make-overlay 'make-overlay) (defalias 'message-delete-overlay 'delete-overlay) (defalias 'message-overlay-put 'overlay-put) +(defun message-kill-all-overlays () + (if (featurep 'xemacs) + (map-extents (lambda (extent ignore) (delete-extent extent))) + (mapcar #'delete-overlay (overlays-in (point-min) (point-max))))) ;; Support for toolbar (eval-when-compile diff --git a/lisp/mml1991.el b/lisp/mml1991.el index d7948b8..cf55c4c 100644 --- a/lisp/mml1991.el +++ b/lisp/mml1991.el @@ -240,7 +240,8 @@ (pop-to-buffer pgg-errors-buffer) (error "Encrypt error")) (delete-region (point-min) (point-max)) - (insert-buffer-substring pgg-output-buffer) + (mm-with-unibyte-current-buffer + (insert-buffer-substring pgg-output-buffer)) (goto-char (point-min)) (while (re-search-forward "\r+$" nil t) (replace-match "" t t)) diff --git a/texi/ChangeLog b/texi/ChangeLog index 86730cd..8adec4b 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,8 @@ +2003-06-03 Jesper Harder + + * gnus.texi (Fancy Mail Splitting): Explain some entries in + nnmail-split-abbrev-alist. + 2003-05-17 Adrian Aichner * emacs-mime.texi (Charset Translation): Ruthless typo fixing. diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index eff0401..38e06e2 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -12840,9 +12840,9 @@ UNDELETED} $B$O$*$=$i$/$?$$$F$$$N?M$K$O:GNI$NA*Br$G$7$g$&$,!"$H$-$I(B @subsubsection $B4X?t%$%s%?!<%U%'!<%9(B $B>e5-$N$$$/$D$+$N%-!<%o!<%I$O!"$l$N%-!<%o!<%I(B @code{:foo} $B$NCM$H$7$F(B Lisp - $BJQ?t(B @code{foo} $B$,;H$o$l$^$9!#Nc$($P!"0J2<$N%a!<%k%=!<%9$N@_DjNc$K$D$$(B -$B$F9M$($F$_$F2<$5$$!#(B +$B$,$l$N%-!<%o!<%I(B @code{:foo} $B$NCM$H$7(B +$B$F(B Lisp $BJQ?t(B @code{foo} $B$,;H$o$l$^$9!#Nc$($P!"0J2<$N%a!<%k%=!<%9$N@_DjNc(B +$B$K$D$$$F9M$($F$_$F2<$5$$!#(B @lisp (setq mail-sources '((pop :user "jrl" @@ -13139,9 +13139,21 @@ table) $B$K=>$C$F40A4$K9gCW$7$J$1$l$P$J$j$^$;$s!#@55,I=8=$G%U%#!<%k%IL>$+(B @vindex nnmail-split-abbrev-alist @var{field} $B$H(B @var{value} $B$O(B Lisp $B%7%s%\%k(B (symbol) $B$G$"$k;v$b$G$-!"$=(B -$B$N>l9g$O$=$l$i$O(B @code{nnmail-split-abbrev-alist} $B$G;XDj$5$l$F$$$k$h$&$K(B -$BE83+$5$l$^$9!#$3$l$O%;%k$N(B @code{car} $B$,%-!<$r4^$s$G$$$F!"(B@code{cdr} $B$,(B -$B4XO"IU$1$i$l$?CM$r;}$C$F$$$k%3%s%9%;%k(B (cons cell) $B$NO"A[%j%9%H$G$9!#(B +$B$N>l9g$=$l$i$O(B @code{nnmail-split-abbrev-alist} $B$G;XDj$5$l$F$$$k$h$&$KE8(B +$B3+$5$l$^$9!#$3$l$O%;%k$N(B @code{car} $B$,%-!<$r4^$s$G$$$F!"(B@code{cdr} $B$,4X(B +$BO"IU$1$i$l$?CM$r;}$C$F$$$k%3%s%9%;%k(B (cons cell) $B$NO"A[%j%9%H$G$9!#0J2<(B +$B$N9`L\$,!"$"$i$+$8$a(B @code{nnmail-split-abbrev-alist} $B$KDj5A$5$l$F$$$^$9(B: + +@table @code +@item from +@samp{From}$B!"(B@samp{Sender} $B$*$h$S(B @samp{Resent-From} $B$N3F%U%#!<%k%I$K9g(B +$BCW$7$^$9!#(B +@item to +@samp{To}$B!"(B@samp{Cc}$B!"(B@samp{Apparently-To}$B!"(B@samp{Resent-To} $B$*$h(B +$B$S(B @samp{Resent-Cc} $B$N3F%U%#!<%k%I$K9gCW$7$^$9!#(B +@item any +@code{from} $B$H(B @code{to} $B$rE}9g$7$?$b$N$G$9!#(B +@end table @vindex nnmail-split-fancy-syntax-table @code{nnmail-split-fancy-syntax-table} $B$,$3$l$i$NA4$F$NJ,3d$,} pairs. @vindex nnmail-split-abbrev-alist -@var{field} and @var{value} can also be Lisp symbols, in that case they -are expanded as specified by the variable -@code{nnmail-split-abbrev-alist}. This is an alist of cons cells, where -the @code{car} of a cell contains the key, and the @code{cdr} contains the associated -value. +@var{field} and @var{value} can also be Lisp symbols, in that case +they are expanded as specified by the variable +@code{nnmail-split-abbrev-alist}. This is an alist of cons cells, +where the @code{car} of a cell contains the key, and the @code{cdr} +contains the associated value. Predefined entries in +@code{nnmail-split-abbrev-alist} include: + +@table @code +@item from +Matches the @samp{From}, @samp{Sender} and @samp{Resent-From} fields. +@item to +Matches the @samp{To}, @samp{Cc}, @samp{Apparently-To}, +@samp{Resent-To} and @samp{Resent-Cc} fields. +@item any +Is the union of the @code{from} and @code{to} entries. +@end table @vindex nnmail-split-fancy-syntax-table @code{nnmail-split-fancy-syntax-table} is the syntax table in effect