From 566642e2a68c060d1b2e66409f16d972373bc007 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Tue, 8 Sep 1998 07:24:15 +0000 Subject: [PATCH] 1998-09-08 Katsumi Yamaoka * lisp/gnus.el (gnus-version-number): Update to 6.10.013. * Sync up with Pterodactyl Gnus 0.19. 1998-09-08 Tatsuya Ichikawa * lisp/gnus-draft.el (gnus-draft-send-draft) (gnus-draft-send): New implementations for testing. * lisp/gnus-agent.el (gnus-agent-expire) (gnus-agent-fetch-headers) (gnus-agent-flush-cache) (gnus-agent-save-history) (gnus-agent-save-groups): Bind `coding-system-for-write' by `gnus-agent-file-coding-system' while writing a file. * lisp/gnus-agent.el (gnus-agent-file-coding-system): Renamed from `gnus-agent-article-file-coding-system'. A snapshot is available from ftp://ftp.jpl.org/pub/tmp/semi-gnus-pgnus-ichikawa-19980908-2.tar.gz --- ChangeLog | 19 ++++++++++++ lisp/ChangeLog | 12 ++++++++ lisp/base64.el | 10 +++--- lisp/gnus-agent.el | 86 +++++++++++++++++++++++++++++----------------------- lisp/gnus-draft.el | 18 ++++++++--- lisp/gnus.el | 4 +-- lisp/lpath.el | 4 ++- lisp/mm-bodies.el | 10 ++---- lisp/mm-util.el | 11 +++++++ lisp/rfc2047.el | 6 +--- texi/gnus-ja.texi | 6 ++-- texi/gnus.texi | 6 ++-- texi/message.texi | 6 ++-- 13 files changed, 126 insertions(+), 72 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0afc405..af2d369 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,24 @@ 1998-09-08 Katsumi Yamaoka + * lisp/gnus.el (gnus-version-number): Update to 6.10.013. + + * Sync up with Pterodactyl Gnus 0.19. + +1998-09-08 Tatsuya Ichikawa + + * lisp/gnus-draft.el (gnus-draft-send-draft) (gnus-draft-send): New + implementations for testing. + + * lisp/gnus-agent.el (gnus-agent-expire) (gnus-agent-fetch-headers) + (gnus-agent-flush-cache) (gnus-agent-save-history) + (gnus-agent-save-groups): Bind `coding-system-for-write' by + `gnus-agent-file-coding-system' while writing a file. + + * lisp/gnus-agent.el (gnus-agent-file-coding-system): Renamed from + `gnus-agent-article-file-coding-system'. + +1998-09-08 Katsumi Yamaoka + * lisp/gnus.el (gnus-version-number): Update to 6.10.012. * Sync up with Pterodactyl Gnus 0.18. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 06e1752..b65153b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,15 @@ +Tue Sep 8 07:09:28 1998 Lars Magne Ingebrigtsen + + * gnus.el: Pterodactyl Gnus v0.19 is released. + +1998-09-08 04:51:39 Lars Magne Ingebrigtsen + + * base64.el (base64-encode-region): Accept no-line-break. + + * mm-util.el (mm-mime-charset): New function. + + * gnus-draft.el (gnus-draft-edit-message): Delete article. + Tue Sep 8 04:29:23 1998 Lars Magne Ingebrigtsen * gnus.el: Pterodactyl Gnus v0.18 is released. diff --git a/lisp/base64.el b/lisp/base64.el index a57c11d..3d89247 100644 --- a/lisp/base64.el +++ b/lisp/base64.el @@ -184,7 +184,7 @@ base64-encoder-program.") ;;(message "Decoding base64... done") ) -(defun base64-encode-region (start end) +(defun base64-encode-region (start end &optional no-line-break) (interactive "r") (message "Encoding base64...") (let ((work-buffer nil) @@ -221,7 +221,8 @@ base64-encoder-program.") (aref alphabet (logand bits 63)) 1 nil work-buffer) (setq cols (+ cols 4)) - (cond ((= cols 72) + (cond ((and (= cols 72) + (not no-line-break)) (base64-insert-char ?\n 1 nil work-buffer) (setq cols 0))) (setq bits 0 counter 0)) @@ -240,8 +241,9 @@ base64-encoder-program.") (base64-insert-char (aref alphabet (logand (lsh bits -6) 63)) 1 nil work-buffer) (base64-insert-char ?= 1 nil work-buffer))) - (if (> cols 0) - (base64-insert-char ?\n 1 nil work-buffer))) + (if (and (> cols 0) + (not no-line-break)) + (base64-insert-char ?\n 1 nil work-buffer))) (or (markerp end) (setq end (set-marker (make-marker) end))) (goto-char start) (insert-buffer-substring work-buffer) diff --git a/lisp/gnus-agent.el b/lisp/gnus-agent.el index cf6b1bd..9c527be 100644 --- a/lisp/gnus-agent.el +++ b/lisp/gnus-agent.el @@ -91,7 +91,7 @@ If nil, only read articles will be expired." (defvar gnus-agent-spam-hashtb nil) (defvar gnus-agent-file-name nil) (defvar gnus-agent-send-mail-function nil) -(defvar gnus-agent-article-file-coding-system 'no-conversion) +(defvar gnus-agent-file-coding-system 'no-conversion) (defconst gnus-agent-scoreable-headers (list @@ -523,7 +523,7 @@ the actual number of articles toggled is returned." (let* ((gnus-command-method method) (file (gnus-agent-lib-file "active"))) (gnus-make-directory (file-name-directory file)) - (let ((coding-system-for-write gnus-agent-article-file-coding-system)) + (let ((coding-system-for-write gnus-agent-file-coding-system)) (write-region (point-min) (point-max) file nil 'silent)) (when (file-exists-p (gnus-agent-lib-file "groups")) (delete-file (gnus-agent-lib-file "groups")))))) @@ -532,9 +532,11 @@ the actual number of articles toggled is returned." (let* ((gnus-command-method method) (file (gnus-agent-lib-file "groups"))) (gnus-make-directory (file-name-directory file)) - (write-region (point-min) (point-max) file nil 'silent)) - (when (file-exists-p (gnus-agent-lib-file "active")) - (delete-file (gnus-agent-lib-file "active")))) + (let ((coding-system-for-write + gnus-agent-file-coding-system)) + (write-region (point-min) (point-max) file nil 'silent))) + (when (file-exists-p (gnus-agent-lib-file "active")) + (delete-file (gnus-agent-lib-file "active")))) (defun gnus-agent-save-group-info (method group active) (when (gnus-agent-method-p method) @@ -603,8 +605,10 @@ the actual number of articles toggled is returned." (save-excursion (set-buffer gnus-agent-current-history) (gnus-make-directory (file-name-directory gnus-agent-file-name)) - (write-region (1+ (point-min)) (point-max) - gnus-agent-file-name nil 'silent))) + (let ((coding-system-for-write + gnus-agent-file-coding-system)) + (write-region (1+ (point-min)) (point-max) + gnus-agent-file-name nil 'silent)))) (defun gnus-agent-close-history () (when (gnus-buffer-live-p gnus-agent-current-history) @@ -702,7 +706,7 @@ the actual number of articles toggled is returned." (setq id "No-Message-ID-in-article") (setq id (buffer-substring (match-beginning 1) (match-end 1)))) (let ((coding-system-for-write - gnus-agent-article-file-coding-system)) + gnus-agent-file-coding-system)) (write-region (point-min) (point-max) (concat dir (number-to-string (caar pos))) nil 'silent)) @@ -745,10 +749,12 @@ the actual number of articles toggled is returned." (save-excursion (while gnus-agent-buffer-alist (set-buffer (cdar gnus-agent-buffer-alist)) - (write-region (point-min) (point-max) - (gnus-agent-article-name ".overview" - (caar gnus-agent-buffer-alist)) - nil 'silent) + (let ((coding-system-for-write + gnus-agent-file-coding-system)) + (write-region (point-min) (point-max) + (gnus-agent-article-name ".overview" + (caar gnus-agent-buffer-alist)) + nil 'silent)) (pop gnus-agent-buffer-alist)) (while gnus-agent-group-alist (with-temp-file (caar gnus-agent-group-alist) @@ -757,35 +763,37 @@ the actual number of articles toggled is returned." (pop gnus-agent-group-alist)))) (defun gnus-agent-fetch-headers (group &optional force) - (let ((articles (if (gnus-agent-load-alist group) - (gnus-sorted-intersection - (gnus-list-of-unread-articles group) - (gnus-uncompress-range - (cons (1+ (caar (last gnus-agent-article-alist))) - (cdr (gnus-active group))))) - (gnus-list-of-unread-articles group)))) + (let ((articles (if (gnus-agent-load-alist group) + (gnus-sorted-intersection + (gnus-list-of-unread-articles group) + (gnus-uncompress-range + (cons (1+ (caar (last gnus-agent-article-alist))) + (cdr (gnus-active group))))) + (gnus-list-of-unread-articles group)))) ;; Fetch them. (when articles (gnus-message 7 "Fetching headers for %s..." group) (save-excursion - (set-buffer nntp-server-buffer) - (unless (eq 'nov (gnus-retrieve-headers articles group)) - (nnvirtual-convert-headers)) - ;; Save these headers for later processing. - (copy-to-buffer gnus-agent-overview-buffer (point-min) (point-max)) - (let (file) - (when (file-exists-p - (setq file (gnus-agent-article-name ".overview" group))) - (gnus-agent-braid-nov group articles file)) - (gnus-make-directory (nnheader-translate-file-chars - (file-name-directory file))) - (write-region (point-min) (point-max) file nil 'silent) - (gnus-agent-save-alist group articles nil) - (gnus-agent-enter-history - "last-header-fetched-for-session" - (list (cons group (nth (- (length articles) 1) articles))) - (time-to-day (current-time))) - articles))))) + (set-buffer nntp-server-buffer) + (unless (eq 'nov (gnus-retrieve-headers articles group)) + (nnvirtual-convert-headers)) + ;; Save these headers for later processing. + (copy-to-buffer gnus-agent-overview-buffer (point-min) (point-max)) + (let (file) + (when (file-exists-p + (setq file (gnus-agent-article-name ".overview" group))) + (gnus-agent-braid-nov group articles file)) + (gnus-make-directory (nnheader-translate-file-chars + (file-name-directory file))) + (let ((coding-system-for-write + gnus-agent-file-coding-system)) + (write-region (point-min) (point-max) file nil 'silent)) + (gnus-agent-save-alist group articles nil) + (gnus-agent-enter-history + "last-header-fetched-for-session" + (list (cons group (nth (- (length articles) 1) articles))) + (time-to-day (current-time))) + articles))))) (defsubst gnus-agent-copy-nov-line (article) (let (b e) @@ -1385,7 +1393,9 @@ The following commands are available: ;; Schedule the history line for nuking. (push (cdr elem) histories))) (gnus-make-directory (file-name-directory nov-file)) - (write-region (point-min) (point-max) nov-file nil 'silent) + (let ((coding-system-for-write + gnus-agent-file-coding-system)) + (write-region (point-min) (point-max) nov-file nil 'silent)) ;; Delete the unwanted entries in the alist. (setq gnus-agent-article-alist (sort gnus-agent-article-alist 'car-less-than-car)) diff --git a/lisp/gnus-draft.el b/lisp/gnus-draft.el index d4995b2..ef7d868 100644 --- a/lisp/gnus-draft.el +++ b/lisp/gnus-draft.el @@ -96,6 +96,8 @@ (let ((article (gnus-summary-article-number))) (gnus-summary-mark-as-read article gnus-canceled-mark) (gnus-draft-setup article gnus-newsgroup-name) + (let ((gnus-verbose-backends nil)) + (gnus-request-expire-articles (list article) gnus-newsgroup-name t)) (push `((lambda () (when (gnus-buffer-exists-p ,gnus-summary-buffer) @@ -162,7 +164,8 @@ (message-remove-header gnus-agent-meta-information-header))) ;; Then we send it. If we have no meta-information, we just send ;; it and let Message figure out how. - (gnus-draft-send-draft type method))) + (if type + (gnus-draft-send-draft type method)))) ;; (defun gnus-draft-send-draft (type method) (if (eq type 'mail) @@ -174,12 +177,17 @@ (goto-char (point-min)) (search-forward "\n\n")))) (if (not (null recipients)) (if (not (smtp-via-smtp user-mail-address recipients (current-buffer))) - (error "Sending failed: SMTP protocol error"))))) + (error "Sending failed: SMTP protocol error") + (let ((gnus-verbose-backends nil)) + (gnus-request-expire-articles + (list article) (or group "nndraft:queue") t)) + (if (get-buffer gnus-draft-send-draft-buffer) + (kill-buffer gnus-draft-send-draft-buffer)))))) ;; Send draft via NNTP. (gnus-open-server method) - (gnus-request-post method)) - (if (get-buffer gnus-draft-send-draft-buffer) - (kill-buffer gnus-draft-send-draft-buffer))) + (gnus-request-post method) + (if (get-buffer gnus-draft-send-draft-buffer) + (kill-buffer gnus-draft-send-draft-buffer)))) ;; For draft TEST (defun gnus-draft-send-all-messages () diff --git a/lisp/gnus.el b/lisp/gnus.el index bbf0cc5..01a5cef 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -253,10 +253,10 @@ is restarted, and sometimes reloaded." (defconst gnus-product-name "T-gnus" "Product name of this version of gnus.") -(defconst gnus-version-number "6.10.012" +(defconst gnus-version-number "6.10.013" "Version number for this version of gnus.") -(defconst gnus-original-version-number "0.18" +(defconst gnus-original-version-number "0.19" "Version number for this version of Gnus.") (defconst gnus-original-product-name "Pterodactyl Gnus" diff --git a/lisp/lpath.el b/lisp/lpath.el index 38fac14..b1020e6 100644 --- a/lisp/lpath.el +++ b/lisp/lpath.el @@ -40,7 +40,9 @@ set-buffer-multibyte find-non-ascii-charset-region char-charset mule-write-region-no-coding-system - find-charset-region base64-decode-string)) + find-charset-region base64-decode-string + find-coding-systems-region get-charset-property + coding-system-get)) (maybe-bind '(global-face-data mark-active transient-mark-mode mouse-selection-click-count mouse-selection-click-count-buffer buffer-display-table diff --git a/lisp/mm-bodies.el b/lisp/mm-bodies.el index c74994e..1b208d2 100644 --- a/lisp/mm-bodies.el +++ b/lisp/mm-bodies.el @@ -51,14 +51,8 @@ If no encoding was done, nil is returned." charsets) ;; We encode. (t - (let ((mime-charset - (or - (coding-system-get - (get-charset-property (car charsets) 'prefered-coding-system) - 'mime-charset) - (car (memq (car charsets) - (find-coding-systems-region - (point-min) (point-max)))))) + (let ((mime-charset + (mm-mime-charset (car charsets) (point-min) (point-max))) start) (when (or t ;; We always decode. diff --git a/lisp/mm-util.el b/lisp/mm-util.el index b36c62b..838a5c8 100644 --- a/lisp/mm-util.el +++ b/lisp/mm-util.el @@ -185,6 +185,17 @@ used as the line break code type of the coding system." (when (string-match "charset *= *\"? *\\([-0-9a-zA-Z_]+\\)\"? *$" header) (intern (downcase (match-string 1 header))))) + +(defun mm-mime-charset (charset b e) + (if (fboundp 'coding-system-get) + (or + (coding-system-get + (get-charset-property charset 'prefered-coding-system) + 'mime-charset) + (car (memq charset (find-coding-systems-region + (point-min) (point-max))))) + (mm-mule-charset-to-mime-charset charset))) + (provide 'mm-util) ;;; mm-util.el ends here diff --git a/lisp/rfc2047.el b/lisp/rfc2047.el index 907a084..c96aeb2 100644 --- a/lisp/rfc2047.el +++ b/lisp/rfc2047.el @@ -181,11 +181,7 @@ Should be called narrowed to the head of the message." (defun rfc2047-encode (b e charset) "Encode the word in the region with CHARSET." (let* ((mime-charset - (or - (coding-system-get - (get-charset-property charset 'prefered-coding-system) - 'mime-charset) - (car (memq charset (find-coding-systems-region b e))))) + (mm-mime-charset charset b e)) (encoding (or (cdr (assq mime-charset rfc2047-charset-encoding-alist)) 'B)) diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index 152fad8..0ceefe6 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @setfilename gnus-ja -@settitle Semi-gnus 6.10.010 Manual +@settitle Semi-gnus 6.10.013 Manual @synindex fn cp @synindex vr cp @synindex pg cp @@ -345,7 +345,7 @@ into another language, under the above conditions for modified versions. @tex @titlepage -@title Semi-gnus 6.10.010 Manual +@title Semi-gnus 6.10.013 Manual @author by Lars Magne Ingebrigtsen @author by members of Semi-gnus mailing-list @@ -399,7 +399,7 @@ Semi-gnus は、大きな絵が入っていたりさまざまな形式を用いたりしているちょっ な言語圏を差別しません。ああ、クリンゴンの方は Unicode Next Generationを お待ちください。 -この説明書は Semi-gnus 6.10.010 に対応します。 +この説明書は Semi-gnus 6.10.013 に対応します。 @end ifinfo diff --git a/texi/gnus.texi b/texi/gnus.texi index 1f06379..72acd16 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @setfilename gnus -@settitle Semi-gnus 6.10.012 Manual +@settitle Semi-gnus 6.10.013 Manual @synindex fn cp @synindex vr cp @synindex pg cp @@ -318,7 +318,7 @@ into another language, under the above conditions for modified versions. @tex @titlepage -@title Semi-gnus 6.10.012 Manual +@title Semi-gnus 6.10.013 Manual @author by Lars Magne Ingebrigtsen @page @@ -361,7 +361,7 @@ internationalization/localization and multiscript features based on MULE API. So Semi-gnus does not discriminate various language communities. Oh, if you are a Klingon, please wait Unicode Next Generation. -This manual corresponds to Semi-gnus 6.10.012. +This manual corresponds to Semi-gnus 6.10.013. @end ifinfo diff --git a/texi/message.texi b/texi/message.texi index 34966cf..a4ac712 100644 --- a/texi/message.texi +++ b/texi/message.texi @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @setfilename message -@settitle Pterodactyl Message 0.18 Manual +@settitle Pterodactyl Message 0.19 Manual @synindex fn cp @synindex vr cp @synindex pg cp @@ -42,7 +42,7 @@ into another language, under the above conditions for modified versions. @tex @titlepage -@title Pterodactyl Message 0.18 Manual +@title Pterodactyl Message 0.19 Manual @author by Lars Magne Ingebrigtsen @page @@ -83,7 +83,7 @@ Message mode buffers. * Key Index:: List of Message mode keys. @end menu -This manual corresponds to Pterodactyl Message 0.18. Message is +This manual corresponds to Pterodactyl Message 0.19. Message is distributed with the Gnus distribution bearing the same version number as this manual has. -- 1.7.10.4