Gnus development mailing list
 help / color / mirror / Atom feed
* [PATCH] to mm-decode.el please someone put it in CVS.
@ 2000-01-05 23:08 Kim-Minh Kaplan
  2000-01-09  2:06 ` Shenghuo ZHU
  0 siblings, 1 reply; 4+ messages in thread
From: Kim-Minh Kaplan @ 2000-01-05 23:08 UTC (permalink / raw)


Can someone put this in the repository please ?

Kim-Minh.

2000-01-06 00:06:40 Kim-Minh Kaplan <kmkaplan@vocatex.fr>

        * mm-decode.el (mm-mailcap-command): handle "%%" and the case where
        there is no "%s" in the method.

--- mm-decode.el	2000/01/05 16:01:17	5.69
+++ mm-decode.el	2000/01/05 23:06:39
@@ -433,20 +433,28 @@
 (defun mm-mailcap-command (method file type-list)
   (let ((ctl (cdr type-list))
 	(beg 0)
+	(uses-stdin t)
 	out sub total)
-    (while (string-match "%{\\([^}]+\\)}\\|%s\\|%t" method beg)
+    (while (string-match "%{\\([^}]+\\)}\\|%s\\|%t\\|%%" method beg)
       (push (substring method beg (match-beginning 0)) out)
       (setq beg (match-end 0)
 	    total (match-string 0 method)
 	    sub (match-string 1 method))
       (cond
+       ((string= total "%%")
+	(push "%" out))
        ((string= total "%s")
+	(setq uses-stdin nil)
 	(push (mm-quote-arg file) out))
        ((string= total "%t")
 	(push (mm-quote-arg (car type-list)) out))
        (t
 	(push (mm-quote-arg (or (cdr (assq (intern sub) ctl)) "")) out))))
     (push (substring method beg (length method)) out)
+    (if uses-stdin
+	(progn
+	  (push "<" out)
+	  (push (mm-quote-arg file) out)))
     (mapconcat 'identity (nreverse out) "")))
     
 (defun mm-remove-parts (handles)



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-04-21 14:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-01-05 23:08 [PATCH] to mm-decode.el please someone put it in CVS Kim-Minh Kaplan
2000-01-09  2:06 ` Shenghuo ZHU
2000-01-10  2:19   ` How does one submit patches ? (was Re: [PATCH] to mm-decode.el please someone put it in CVS.) Kim-Minh Kaplan
2000-04-21 14:14     ` Lars Magne Ingebrigtsen

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).