From: yamaoka Date: Wed, 21 Nov 2001 08:08:55 +0000 (+0000) Subject: Synch with Oort Gnus. X-Git-Tag: t-gnus-6_15_4-08-quimby-last-~4 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=04a88241179b917402a18b430f0c15814d7bbd2a;p=elisp%2Fgnus.git- Synch with Oort Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 355102f..8a6a5fd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,32 @@ +2001-11-21 01:00:00 ShengHuo ZHU + + * gnus-agent.el (gnus-category-insert-line): Convert category + names to strings. + +2001-11-20 21:00:00 ShengHuo ZHU + + * message.el (sha1): eval-and-compile. + +2001-11-20 Simon Josefsson + + * message.el (message-allow-no-recipients): New variable. + (message-send): Use it, customize the prompting when posting to + Gcc/Fcc alone. From prj@po.cwru.edu (Paul Jarc). + +2001-11-20 09:00:00 ShengHuo ZHU + + * mm-util.el (mm-coding-system-priorities): New. + (mm-sort-coding-systems-predicate): New. + (mm-find-mime-charset-region): Resort coding systems if needed. + Suggested by Katsumi Yamaoka . + +2001-11-20 Didier Verna + + * gnus-group.el (gnus-group-make-help-group): new optional + argument to control the error behavior. + * gnus-start.el (gnus-check-first-time-used): use it to avoid + erroring. + 2001-11-19 Simon Josefsson * message.el (message-mode-map): Use C-c C-f C-i for Importance: @@ -23,7 +52,7 @@ 2001-11-16 Simon Josefsson - * message.el (message-insert-importance-high) + * message.el (message-insert-importance-high) (message-insert-importance-low): Save point. * mail-source.el (mail-source-fetch-imap): Fix BODY.PEEK return @@ -45,7 +74,7 @@ * message.el (message-mode-map): Bind C-c C-p to `message-insert-or-toggle-importance' (message-mode-menu): Add message-insert-importance-{high,low}. - (message-insert-importance-high, message-insert-importance-low) + (message-insert-importance-high, message-insert-importance-low) (message-insert-or-toggle-importance): New functions. (message-tool-bar-map): Add {un,}important. (message-mode): Doc fix. @@ -60,7 +89,7 @@ * nnfolder.el (nnfolder-save-marks): gnus-prin1 takes one argument. * nnml.el (nnml-save-marks): Ditto. - + * gnus-sum.el (gnus-newsgroup-variables): Fix doc. 2001-11-15 Simon Josefsson @@ -75,7 +104,7 @@ `copy-sequence', not `copy-seq'. 2001-11-15 Per Abrahamsen - + * gnus-art.el (gnus-article-wash-status-strings): New constant. (gnus-gnus-article-wash-status-entry): New function. (gnus-article-wash-status): Use it. @@ -179,7 +208,7 @@ * mail-source.el (mail-source-fetch-imap): ASYNC param. From: - + 2001-11-06 10:00:00 ShengHuo ZHU * many files: Fix copyright lines. @@ -245,7 +274,7 @@ (imap-parse-response): Call the callback. * message.el (message-insert-canlock): New variable. - (message-canlock-generate, message-canlock-password) + (message-canlock-generate, message-canlock-password) (message-insert-canlock): New functions. (message-send-news): Call `message-insert-canlock'. (top-level): Require canlock when compiling. @@ -343,7 +372,7 @@ * mail-source.el (mail-source-fetch): If debug, don't regain signals. (mail-source-fetch-pop): Ditto. (mail-source-check-pop): Ditto. - + * gnus-start.el (gnus-read-init-file): Ditto. (gnus-activate-group): Ditto. (gnus-read-newsrc-el-file): Ditto. @@ -381,13 +410,13 @@ (mm-find-mime-charset-region): Re-write. (mm-with-unibyte-current-buffer): Restore buffer as well as multibyteness. - + 2001-10-30 21:00:00 ShengHuo ZHU * canlock.el, sha1-el.el, hex-util.el: Move from contrib directory. Thanks to Katsumi Yamaoka and Shuhei KOBAYASHI . - + 2001-10-30 20:00:00 ShengHuo ZHU * gnus-art.el (article-display-x-face): Nix buffer-read-only @@ -413,7 +442,7 @@ (nntp-async-trigger): Ditto. (nntp-request-post): Insert a server's ID if there's no Message-ID header; run `nntp-prepare-post-hook'. - + 2001-10-30 04:00:00 ShengHuo ZHU * gnus-art.el (article-decode-group-name): Use nnmail-fetch-field @@ -517,9 +546,9 @@ (nnimap-strict-function, nnimap-strict-function-match): New widget, from Per Abrahamsen . (nnimap-split-crosspost, nnimap-split-inbox) - (nnimap-split-rule, nnimap-split-predicate) + (nnimap-split-rule, nnimap-split-predicate) (nnimap-split-predicate): Defcustom. - (nnimap-split-inbox, nnimap-expunge-search-string) + (nnimap-split-inbox, nnimap-expunge-search-string) (nnimap-importantize-dormant): Remove "*" from doc. 2001-10-20 Kai Gro,A_(Bjohann @@ -531,11 +560,11 @@ 2001-10-20 Per Abrahamsen * message.el (message-do-auto-fill): Avoid calling - 'rfc822-goto-eoh'. + 'rfc822-goto-eoh'. 2001-10-20 Kai Gro,A_(Bjohann From Paul Jarc . - + * message.el (message-get-reply-headers): Restructure the logic and add comments. From Paul Jarc . @@ -559,7 +588,7 @@ 2001-10-19 Per Abrahamsen * message.el (message-do-auto-fill): New version that does not - rely on text properties, by Simon Josefsson . + rely on text properties, by Simon Josefsson . (message-setup-1): Removed the `message-field' property. * gnus-draft.el (gnus-draft-edit-message): Removed the @@ -592,9 +621,9 @@ 2001-10-17 17:00:00 ShengHuo ZHU * gnus-sum.el (gnus-summary-line-format-alist): user-date entry. - * gnus-util.el (gnus-user-date): New function. + * gnus-util.el (gnus-user-date): New function. From Frank Schmitt . - + 2001-10-17 Per Abrahamsen * message.el (message-check-news-header-syntax): Special case @@ -607,7 +636,7 @@ * gnus-spec.el (gnus-parse-simple-format): Support extended spec %&foo;. - (gnus-parse-simple-format): Support user extended spec too. + (gnus-parse-simple-format): Support user extended spec too. %u&foo; invokes gnus-user-format-function-foo. 2001-10-17 11:00:00 ShengHuo ZHU @@ -695,7 +724,7 @@ 2001-10-12 Kai Gro,A_(Bjohann Suggested by Oliver Scholz . - + * message.el (message-do-auto-fill): New function. Like `do-auto-fill' but don't fill when in the message header. (message-setup-1): Put a text property on the message header. @@ -716,7 +745,7 @@ * message.el (message-send-news): Don't modify the value of `message-syntax-checks' if it is not a list (possibly it is `dont-check-for-anything-just-trust-me'). - + 2001-10-10 Katsumi Yamaoka * gnus-group.el (gnus-group-name-charset-group-alist): Use @@ -753,10 +782,10 @@ `gnus-group-name-charset-group-alist is' ".*". [Yuck] * gnus-util.el (gnus-decode-newsgroups): No space in newsgroup - header. + header. * gnus-art.el (article-decode-group-name): Also decode - "Followup-To". + "Followup-To". * rfc2047.el (rfc2047-encode-message-header): Encode without asking for null methods. @@ -767,11 +796,11 @@ * gnus-group.el (gnus-group-name-charset-method-alist, gnus-group-name-charset-group-alist): Removed "*" from doc strings, "*" should not be used for complex variables. - + 2001-10-06 Simon Josefsson Support UTF-8 group names better. - + * message.el (message-check-news-header-syntax): Encode group names before comparison. @@ -791,7 +820,7 @@ 2001-10-06 Per Abrahamsen * gnus-srvr.el (gnus-browse-foreign-server): Fixed bug non-nil - `gnus-group-name-charset-group-alist'. + `gnus-group-name-charset-group-alist'. 2001-10-06 08:00:00 ShengHuo ZHU @@ -857,7 +886,7 @@ nndraft:delayed does not exist. (gnus-delay-initialize): Don't set up keymap, that's done from message.el now. - (gnus-delay, gnus-delay-group, gnus-delay-header) + (gnus-delay, gnus-delay-group, gnus-delay-header) (gnus-delay-default-delay, gnus-delay-default-hour): Customize. 2001-09-29 Simon Josefsson @@ -865,12 +894,12 @@ * mm-util.el (mm-mime-mule-charset-alist): Encode mule-utf-8 as utf-8, not eight-bit-control. - * imap.el (imap-shell-host, imap-default-user, imap-use-utf7) + * imap.el (imap-shell-host, imap-default-user, imap-use-utf7) (imap-log, imap-debug): Custom. (imap-log-buffer, imap-debug-buffer): New constants. - (imap-kerberos4-open, imap-gssapi-open, imap-ssl-open) - (imap-network-open, imap-shell-open, imap-starttls-open) - (imap-send-command-1, imap-send-command, imap-arrival-filter) + (imap-kerberos4-open, imap-gssapi-open, imap-ssl-open) + (imap-network-open, imap-shell-open, imap-starttls-open) + (imap-send-command-1, imap-send-command, imap-arrival-filter) (imap-debug): Use imap-*-buffer. * nndoc.el (nndoc-article-type): Add mailman. diff --git a/lisp/gnus-agent.el b/lisp/gnus-agent.el index 46e2a42..a7bb8c8 100644 --- a/lisp/gnus-agent.el +++ b/lisp/gnus-agent.el @@ -1356,7 +1356,7 @@ The following commands are available: (defalias 'gnus-category-position-point 'gnus-goto-colon) (defun gnus-category-insert-line (category) - (let* ((gnus-tmp-name (car category)) + (let* ((gnus-tmp-name (format "%s" (car category))) (gnus-tmp-groups (length (cadddr category)))) (beginning-of-line) (gnus-add-text-properties diff --git a/lisp/gnus-group.el b/lisp/gnus-group.el index e913321..834bf93 100644 --- a/lisp/gnus-group.el +++ b/lisp/gnus-group.el @@ -2341,20 +2341,33 @@ and NEW-NAME will be prompted for." (setcar entry (eval (cadar entry))))) (gnus-group-make-group group method)) -(defun gnus-group-make-help-group () - "Create the Gnus documentation group." +(defun gnus-group-make-help-group (&optional noerror) + "Create the Gnus documentation group. +Optional argument NOERROR modifies the behavior of this function when the +group already exists: +- if not given, and error is signaled, +- if t, stay silent, +- if anything else, just print a message." (interactive) (let ((name (gnus-group-prefixed-name "gnus-help" '(nndoc "gnus-help"))) (file (nnheader-find-etc-directory "gnus-tut.txt" t))) - (when (gnus-gethash name gnus-newsrc-hashtb) - (error "Documentation group already exists")) - (if (not file) - (gnus-message 1 "Couldn't find doc group") - (gnus-group-make-group - (gnus-group-real-name name) - (list 'nndoc "gnus-help" - (list 'nndoc-address file) - (list 'nndoc-article-type 'mbox))))) + (if (gnus-gethash name gnus-newsrc-hashtb) + (cond ((eq noerror nil) + (error "Documentation group already exists")) + ((eq noerror t) + ;; stay silent + ) + (t + (gnus-message 1 "Documentation group already exists"))) + ;; else: + (if (not file) + (gnus-message 1 "Couldn't find doc group") + (gnus-group-make-group + (gnus-group-real-name name) + (list 'nndoc "gnus-help" + (list 'nndoc-address file) + (list 'nndoc-article-type 'mbox)))) + )) (gnus-group-position-point)) (defun gnus-group-make-doc-group (file type) diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index 70e5f46..84801c7 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -1239,7 +1239,9 @@ for new groups, and subscribe the new groups as zombies." group gnus-level-default-subscribed gnus-level-killed))) (save-excursion (set-buffer gnus-group-buffer) - (gnus-group-make-help-group)) + ;; Don't error if the group already exists. This happens when a + ;; first-time user types 'F'. -- didier + (gnus-group-make-help-group t)) (when gnus-novice-user (gnus-message 7 "`A k' to list killed groups")))))) diff --git a/lisp/message.el b/lisp/message.el index 31d19ab..02cbf71 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -55,7 +55,8 @@ (require 'mml)) (require 'rfc822) -(autoload 'sha1 "sha1-el") +(eval-and-compile + (autoload 'sha1 "sha1-el")) (defgroup message '((user-mail-address custom-variable) (user-full-name custom-variable)) @@ -594,6 +595,16 @@ regular expressions can be used in conjuction with :group 'message-interface :type '(repeat regexp)) +(defcustom message-allow-no-recipients 'ask + "Specifies what to do when there are no recipients other than Gcc/Fcc. +If it is the symbol `always', the posting is allowed. If it is the +symbol `never', the posting is not allowed. If it is the symbol +`ask', you are prompted." + :group 'message-interface + :type '(choice (const always) + (const never) + (const ask))) + (defcustom message-sendmail-f-is-evil nil "*Non-nil means don't add \"-f username\" to the sendmail command line. Doing so would be even more evil than leaving it out." @@ -2917,7 +2928,7 @@ It should typically alter the sending method in some way or other." (message-mime-mode mime-edit-mode-flag) (alist message-send-method-alist) (success t) - elem sent + elem sent dont-barf-on-no-method (message-options message-options)) (message-options-set-recipient) (save-excursion @@ -2942,10 +2953,23 @@ It should typically alter the sending method in some way or other." (error "Denied posting -- multiple copies"))) (setq success (funcall (caddr elem) arg))) (setq sent t))))) - (unless (or sent (not success)) + (unless + (or sent (not success) + (let ((fcc (message-fetch-field "Fcc")) + (gcc (message-fetch-field "Gcc"))) + (when (or fcc gcc) + (or (eq message-allow-no-recipients 'always) + (and (not (eq message-allow-no-recipients 'never)) + (setq dont-barf-on-no-method + (gnus-y-or-n-p + (format "No receiver, perform %s anyway? " + (cond ((and fcc gcc) "Fcc and Gcc") + (fcc "Fcc") + (t "Gcc")))))))))) (error "No methods specified to send by")) (prog1 - (when (and success sent) + (when (or dont-barf-on-no-method + (and success sent)) (message-do-fcc) (save-excursion (run-hooks 'message-sent-hook)) diff --git a/lisp/mm-util.el b/lisp/mm-util.el index 18c144b..3e09ae7 100644 --- a/lisp/mm-util.el +++ b/lisp/mm-util.el @@ -271,6 +271,19 @@ Valid elements include: mm-iso-8859-15-compatible)) "A table of the difference character between ISO-8859-X and ISO-8859-15.") +(defvar mm-coding-system-priorities nil + "Preferred coding systems for encoding outgoing mails. + +More than one suitable coding systems may be found for some texts. By +default, a coding system with the highest priority is used to encode +outgoing mails (see `sort-coding-systems'). If this variable is set, +it overrides the default priority. For example, Japanese users may +prefer iso-2022-jp to japanese-shift-jis: + +(setq mm-coding-system-priorities + '(iso-2022-jp iso-2022-jp-2 japanese-shift-jis utf-8)) +") + ;;; Internal variables: ;;; Functions: @@ -383,8 +396,8 @@ Only used in Emacs Mule 4." (defun mm-preferred-coding-system (charset) ;; A typo in some Emacs versions. - (or (get-charset-property charset 'prefered-coding-system) - (get-charset-property charset 'preferred-coding-system))) + (or (get-charset-property charset 'preferred-coding-system) + (get-charset-property charset 'prefered-coding-system))) (defun mm-charset-after (&optional pos) "Return charset of a character in current buffer at position POS. @@ -475,6 +488,10 @@ If the charset is `composition', return the actual one." (skip-chars-forward "\0-\177")))) (not inconvertible)))) +(defun mm-sort-coding-systems-predicate (a b) + (> (length (memq a mm-coding-system-priorities)) + (length (memq b mm-coding-system-priorities)))) + (defun mm-find-mime-charset-region (b e &optional hack-charsets) "Return the MIME charsets needed to encode the region between B and E. Nil means ASCII, a single-element list represents an appropriate MIME @@ -486,6 +503,9 @@ charset, and a longer list means no appropriate charset." ;; Find the mime-charset of the most preferred coding ;; system that has one. (let ((systems (find-coding-systems-region b e))) + (when mm-coding-system-priorities + (setq systems + (sort systems 'mm-sort-coding-systems-predicate))) ;; Fixme: The `mime-charset' (`x-ctext') of `compound-text' ;; is not in the IANA list. (setq systems (delq 'compound-text systems))