Gnus development mailing list
 help / color / mirror / Atom feed
From: Shenghuo ZHU <zsh@cs.rochester.edu>
Subject: Re: Test: alternative multipart in a mixed multipart
Date: 25 Oct 1998 01:16:07 -400	[thread overview]
Message-ID: <2nbtn1usq0.fsf@zsh.cs.rochester.edu> (raw)
In-Reply-To: Shenghuo ZHU's message of "Sun, 25 Oct 1998 01:07:27 -0400"


After applying the patch, it will shown as

[1. text/plain]
Part1


[*] text/plain          [ ] image/gif           

Test

  
[2. text/plain]

Part3

This patch is a bit ugly. It seems better to split
gnus-mime-display-alternative into initial function and callback
function.

-- 
Shenghuo

:- cut --------------------------------
--- ChangeLog	1998/10/25 04:56:31	1.1
+++ ChangeLog	1998/10/25 05:01:04
@@ -1,3 +1,8 @@
+Sun Oct 25 00:59:23 1998  Shenghuo ZHU  <zsh@cs.rochester.edu>
+
+	* gnus-art.el (gnus-mime-display-alternative): Show alternative
+ 	multipart with other parts in a mixed multipart.
+
 Sat Oct 24 16:48:51 1998  Shenghuo ZHU  <zsh@cs.rochester.edu>
 
 	* mm-uu.el (mm-uu-dissect): Delete the begining spurious newline

--- gnus-art.el	1998/10/25 04:56:12	1.1
+++ gnus-art.el	1998/10/25 04:57:37
@@ -2400,18 +2400,14 @@
       (goto-char (point-max)))))
 
 (defun gnus-mime-display-alternative (handles &optional preferred)
-  (let* ((preferred (mm-preferred-alternative handles preferred))
+  (let* ((is-callback preferred)
+	 (preferred (mm-preferred-alternative handles preferred))
 	 (ihandles handles)
 	 (point (point))
 	 handle buffer-read-only from)
-    (goto-char (point-min))
-    (search-forward "\n\n" nil t)
-    (delete-region (point) (point-max))
-    (when preferred
-      ;; Top-level call; we clean up.
-      (mm-remove-parts gnus-article-mime-handles)
-      (setq gnus-article-mime-handles handles
-	    gnus-article-mime-handle-alist nil))
+    (when is-callback
+      (delete-region (gnus-point-at-bol) (progn (forward-line 1) (point)))
+      (mm-remove-parts handles))
     (while (setq handle (pop handles))
       (gnus-add-text-properties
        (setq from (point))
@@ -2437,12 +2433,18 @@
 			     :action 'gnus-widget-press-button
 			     :button-keymap gnus-widget-button-keymap)
       (insert "  "))
-    (insert "\n\n")
+    (insert "\n")
+    (if is-callback nil
+      (insert "\n")
+      (goto-char (point-max)))
     (when preferred
       (if (stringp (car preferred))
 	  (gnus-display-mime preferred)
 	(mm-display-part preferred)))
-    (goto-char point)))
+    (if is-callback
+	(goto-char point)
+      (goto-char (point-max))
+      (insert "\n"))))
 
 (defun gnus-article-wash-status ()
   "Return a string which display status of article washing."


  parent reply	other threads:[~1998-10-25  5:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-10-25  5:07 Shenghuo ZHU
1998-10-25  5:09 ` Lars Magne Ingebrigtsen
1998-10-25  5:16 ` Shenghuo ZHU [this message]
1998-10-25  7:16   ` Vladimir Volovich
1998-10-25 16:57     ` Lars Magne Ingebrigtsen
1998-10-27 12:35       ` Robert Bihlmeyer
1998-10-28  7:25         ` Lars Magne Ingebrigtsen
1998-10-28  9:33           ` Robert Bihlmeyer
1998-11-07 23:35             ` Lars Magne Ingebrigtsen
1998-10-25 22:54 ` Hrvoje Niksic
1998-10-26 18:37   ` Shenghuo ZHU
1998-10-26 22:19   ` Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2nbtn1usq0.fsf@zsh.cs.rochester.edu \
    --to=zsh@cs.rochester.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).