From: yamaoka Date: Wed, 18 Nov 1998 07:28:22 +0000 (+0000) Subject: Sync up with Pterodactyl Gnus 0.50. X-Git-Tag: pgnus-ichikawa-199811302358~30 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=ab0a2911a4698aa1246a13f3622b300671ad9fe1;p=elisp%2Fgnus.git- Sync up with Pterodactyl Gnus 0.50. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 65aa8db..65948da 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,59 @@ +Wed Nov 18 05:06:44 1998 Lars Magne Ingebrigtsen + + * gnus.el: Pterodactyl Gnus v0.50 is released. + +1998-11-18 04:42:01 Lars Magne Ingebrigtsen + + * mm-decode.el (mm-inline-media-tests): Check that device-type is + fbound. + + * gnus-sum.el (gnus-summary-sort): Didn't do reverse. + +1998-11-07 23:39:48 Simon Josefsson + + * gnus.el (gnus-similar-server-opened): Compare backend. + +1998-11-08 03:37:42 Simon Josefsson + + * gnus-topic.el (gnus-topic-expire-articles): New function. + (gnus-topic-mode-map): Bind it. + + * gnus.texi (Topic Commands): New expiry command. Reordered. + +1998-11-10 Miles Bader + + * gnus-sum.el + (gnus-auto-expirable-marks): New variable. + (gnus-inhibit-user-auto-expire): New variable. + (gnus-summary-mark-article-as-read, gnus-summary-mark-article): + When looking to see if we should expire instead, check + gnus-auto-expirable-marks instead of using a hard-wired list. + (gnus-summary-mark-as-read-forward, + gnus-summary-mark-as-read-backward): + Pass gnus-inhibit-user-auto-expire for the no-expire argument to + gnus-summary-mark-forward, instead of `t'. + +1998-11-18 03:30:26 Lars Magne Ingebrigtsen + + * mml.el (mml-compute-boundary): New function. + (mml-compute-boundary-1): New function. + (mml-generate-mime-1): Use it. + +1998-11-18 Hrvoje Niksic + + * mml.el (mml-generate-mime-1): Always precede closing boundary + with newline. + +1998-11-18 02:36:37 Lars Magne Ingebrigtsen + + * mml.el (mml-generate-mime-1): Do right boundaries when several + multiparts. + + * mm-decode.el (mm-user-automatic-display): Default to inline + jpeg. + + * mml.el (mml-generate-mime-1): Encode non-text parts. + Wed Nov 18 02:22:23 1998 Lars Magne Ingebrigtsen * gnus.el: Pterodactyl Gnus v0.49 is released. diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index cbbbea5..1001fb3 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -491,6 +491,19 @@ It uses the same syntax as the `gnus-split-methods' variable." :group 'gnus-extract-view :type 'boolean) +(defcustom gnus-auto-expirable-marks + (list gnus-killed-mark gnus-del-mark gnus-catchup-mark + gnus-low-score-mark gnus-ancient-mark gnus-read-mark + gnus-souped-mark gnus-duplicate-mark) + "*The list of marks converted into expiration if a group is auto-expirable." + :group 'gnus-summary + :type '(repeat character)) + +(defcustom gnus-inhibit-user-auto-expire nil + "*If non-nil, user marking commands will not mark an article as expirable, even if the group has auto-expire turned on." + :group 'gnus-summary + :type 'boolean) + (defcustom gnus-view-pseudos nil "*If `automatic', pseudo-articles will be viewed automatically. If `not-confirm', pseudos will be viewed automatically, and the user @@ -7756,11 +7769,7 @@ returned." (setq mark (gnus-request-update-mark gnus-newsgroup-name article mark)) ;; Check for auto-expiry. (when (and gnus-newsgroup-auto-expire - (or (= mark gnus-killed-mark) (= mark gnus-del-mark) - (= mark gnus-catchup-mark) (= mark gnus-low-score-mark) - (= mark gnus-ancient-mark) - (= mark gnus-read-mark) (= mark gnus-souped-mark) - (= mark gnus-duplicate-mark))) + (memq mark gnus-auto-expirable-marks)) (setq mark gnus-expirable-mark) ;; Let the backend know about the mark change. (setq mark (gnus-request-update-mark gnus-newsgroup-name article mark)) @@ -7811,25 +7820,21 @@ returned." "Mark ARTICLE with MARK. MARK can be any character. Four MARK strings are reserved: `? ' (unread), `?!' (ticked), `??' (dormant) and `?E' (expirable). -If MARK is nil, then the default character `?D' is used. +If MARK is nil, then the default character `?r' is used. If ARTICLE is nil, then the article on the current line will be marked." ;; The mark might be a string. (when (stringp mark) (setq mark (aref mark 0))) ;; If no mark is given, then we check auto-expiring. - (and (not no-expire) - gnus-newsgroup-auto-expire - (or (not mark) - (and (gnus-characterp mark) - (or (= mark gnus-killed-mark) (= mark gnus-del-mark) - (= mark gnus-catchup-mark) (= mark gnus-low-score-mark) - (= mark gnus-read-mark) (= mark gnus-souped-mark) - (= mark gnus-duplicate-mark)))) - (setq mark gnus-expirable-mark)) - (let* ((mark (or mark gnus-del-mark)) - (article (or article (gnus-summary-article-number))) - (old-mark (gnus-summary-article-mark article))) + (when (null mark) + (setq mark gnus-del-mark)) + (when (and (not no-expire) + gnus-newsgroup-auto-expire + (memq mark gnus-auto-expirable-marks)) + (setq mark gnus-expirable-mark)) + (let ((article (or article (gnus-summary-article-number))) + (old-mark (gnus-summary-article-mark article))) ;; Allow the backend to change the mark. (setq mark (gnus-request-update-mark gnus-newsgroup-name article mark)) (if (eq mark old-mark) @@ -7974,14 +7979,14 @@ If N is negative, mark backwards instead. The difference between N and the actual number of articles marked is returned." (interactive "p") - (gnus-summary-mark-forward n gnus-del-mark t)) + (gnus-summary-mark-forward n gnus-del-mark gnus-inhibit-user-auto-expire)) (defun gnus-summary-mark-as-read-backward (n) "Mark the N articles as read backwards. The difference between N and the actual number of articles marked is returned." (interactive "p") - (gnus-summary-mark-forward (- n) gnus-del-mark t)) + (gnus-summary-mark-forward (- n) gnus-del-mark gnus-inhibit-user-auto-expire)) (defun gnus-summary-mark-as-read (&optional article mark) "Mark current article as read. @@ -8526,17 +8531,15 @@ Argument REVERSE means reverse order." (let* ((thread (intern (format "gnus-thread-sort-by-%s" predicate))) (article (intern (format "gnus-article-sort-by-%s" predicate))) (gnus-thread-sort-functions - (list - (if (not reverse) - thread - `(lambda (t1 t2) - (,thread t2 t1))))) + (if (not reverse) + thread + `(lambda (t1 t2) + (,thread t2 t1)))) (gnus-article-sort-functions - (list - (if (not reverse) - article - `(lambda (t1 t2) - (,article t2 t1))))) + (if (not reverse) + article + `(lambda (t1 t2) + (,article t2 t1)))) (buffer-read-only) (gnus-summary-prepare-hook nil)) ;; We do the sorting by regenerating the threads. diff --git a/lisp/gnus-topic.el b/lisp/gnus-topic.el index c3dd816..03bb313 100644 --- a/lisp/gnus-topic.el +++ b/lisp/gnus-topic.el @@ -907,6 +907,7 @@ articles in the topic and its subtopics." "=" gnus-topic-select-group "\r" gnus-topic-select-group " " gnus-topic-read-group + "\C-c\C-x" gnus-topic-expire-articles "\C-k" gnus-topic-kill-group "\C-y" gnus-topic-yank-group "\M-g" gnus-topic-get-new-news-this-topic @@ -1040,6 +1041,19 @@ If performed over a topic line, toggle folding the topic." (mouse-set-point e) (gnus-topic-read-group nil)) +(defun gnus-topic-expire-articles (topic) + "Expire articles in this topic or group." + (interactive (list (gnus-group-topic-name))) + (if (not topic) + (call-interactively 'gnus-group-expire-articles) + (save-excursion + (gnus-message 5 "Expiring groups in %s..." topic) + (let ((gnus-group-marked + (mapcar (lambda (entry) (car (nth 2 entry))) + (gnus-topic-find-groups topic gnus-level-killed t)))) + (gnus-group-expire-articles nil)) + (gnus-message 5 "Expiring groups in %s...done" topic)))) + (defun gnus-topic-read-group (&optional all no-article group) "Read news in this newsgroup. If the prefix argument ALL is non-nil, already read articles become diff --git a/lisp/gnus.el b/lisp/gnus.el index 6b0cfc4..c2f7ba5 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -259,10 +259,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.035" +(defconst gnus-version-number "6.10.036" "Version number for this version of gnus.") -(defconst gnus-original-version-number "0.49" +(defconst gnus-original-version-number "0.50" "Version number for this version of Gnus.") (defconst gnus-original-product-name "Pterodactyl Gnus" @@ -2723,6 +2723,7 @@ If NEWSGROUP is nil, return the global kill file name instead." (let ((opened gnus-opened-servers)) (while (and method opened) (when (and (equal (cadr method) (cadaar opened)) + (equal (car method) (caaar opened)) (not (equal method (caar opened)))) (setq method nil)) (pop opened)) diff --git a/lisp/mm-decode.el b/lisp/mm-decode.el index cd78c35..04151e0 100644 --- a/lisp/mm-decode.el +++ b/lisp/mm-decode.el @@ -50,7 +50,8 @@ ("image/png" mm-inline-image (featurep 'png)) ("image/gif" mm-inline-image (featurep 'gif)) ("image/tiff" mm-inline-image (featurep 'tiff)) - ("image/xbm" mm-inline-image (eq (device-type) 'x)) + ("image/xbm" mm-inline-image (and (fboundp 'device-type) + (eq (device-type) 'x))) ("image/xpm" mm-inline-image (featurep 'xpm)) ("image/bmp" mm-inline-image (featurep 'bmp)) ("text/plain" mm-inline-text t) @@ -73,7 +74,7 @@ (defvar mm-user-automatic-display '("text/plain" "text/enriched" "text/richtext" "text/html" "image/gif" - "message/delivery-status" "multipart/.*")) + "image/jpeg" "message/delivery-status" "multipart/.*")) (defvar mm-alternative-precedence '("text/plain" "text/enriched" "text/richtext" "text/html") diff --git a/lisp/mml.el b/lisp/mml.el index fab6be2..3920f9a 100644 --- a/lisp/mml.el +++ b/lisp/mml.el @@ -97,11 +97,13 @@ (buffer-substring beg (goto-char (point-max)))))) (defvar mml-boundary nil) +(defvar mml-multipart-number 0) (defun mml-generate-mime () "Generate a MIME message based on the current MML document." - (setq mml-boundary "=-=-=") - (let ((cont (mml-parse))) + (setq mml-boundary "-=-=") + (let ((cont (mml-parse)) + (mml-multipart-number 0)) (with-temp-buffer (if (and (consp (car cont)) (= (length cont) 1)) @@ -134,7 +136,8 @@ (if (setq filename (cdr (assq 'filename cont))) (insert-file-contents-literally filename) (insert (cdr (assq 'contents cont)))) - (setq coded (buffer-string)))) + (setq encoding (mm-encode-buffer type) + coded (buffer-string)))) (when (or charset (not (equal type "text/plain"))) (insert "Content-Type: " type) @@ -146,23 +149,46 @@ (insert "\n") (insert coded))) ((eq (car cont) 'multipart) - (let ((mml-boundary (concat "=" mml-boundary))) + (let ((mml-boundary (mml-compute-boundary cont))) (insert (format "Content-Type: multipart/%s; boundary=\"%s\"\n" (or (cdr (assq 'type cont)) "mixed") mml-boundary)) (insert "\n") (setq cont (cddr cont)) (while cont - (unless (bolp) - (insert "\n")) - (insert "--" mml-boundary "\n") + (insert "\n--" mml-boundary "\n") (mml-generate-mime-1 (pop cont))) - (unless (bolp) - (insert "\n")) - (insert "--" mml-boundary "--\n"))) + (insert "\n--" mml-boundary "--\n"))) (t (error "Invalid element: %S" cont)))) +(defun mml-compute-boundary (cont) + "Return a unique boundary that does not exist in CONT." + (let ((mml-boundary (concat (make-string (incf mml-multipart-number) ?=) + mml-boundary))) + ;; This function tries again and again until it has found + ;; a unique boundary. + (while (not (catch 'not-unique + (mml-compute-boundary-1 cont)))) + mml-boundary)) + +(defun mml-compute-boundary-1 (cont) + (cond + ((eq (car cont) 'part) + (with-temp-buffer + (if (setq filename (cdr (assq 'filename cont))) + (insert-file-contents-literally filename) + (insert (cdr (assq 'contents cont)))) + (goto-char (point-min)) + (when (re-search-forward (concat "^--" mml-boundary) nil t) + (setq mml-boundary + (concat (make-string (incf mml-multipart-number) ?=) + mml-boundary)) + (throw 'not-unique nil)))) + ((eq (car cont) 'multipart) + (mapcar 'mml-compute-boundary-1 (cddr cont)))) + t) + (provide 'mml) ;;; mml.el ends here