(mm-mailcap-command): Do not backslash-quote
authorKai Grossjohann <kgrossjo@eu.uu.net>
Sat, 21 Dec 2002 20:55:40 +0000 (20:55 +0000)
committerKai Grossjohann <kgrossjo@eu.uu.net>
Sat, 21 Dec 2002 20:55:40 +0000 (20:55 +0000)
special chars if the mailcap file uses single quotes around %s.
From Laurent Martelli <laurent@bearteam.org>.

lisp/ChangeLog
lisp/mm-decode.el

index 4b20657..b37fc19 100644 (file)
@@ -1,3 +1,9 @@
+2002-12-21  Kai Gro\e,A_\e(Bjohann  <kai.grossjohann@uni-duisburg.de>
+
+       * mm-decode.el (mm-mailcap-command): Do not backslash-quote
+       special chars if the mailcap file uses single quotes around %s.
+       From Laurent Martelli <laurent@bearteam.org>.   
+
 2002-12-19  Paul Jarc  <prj@po.cwru.edu>
 
        * gnus-int.el (gnus-request-update-info): nnchoke-r-u-i might not
index 54438bc..4b35fa4 100644 (file)
@@ -774,7 +774,7 @@ external if displayed external."
        (beg 0)
        (uses-stdin t)
        out sub total)
-    (while (string-match "%{\\([^}]+\\)}\\|%s\\|%t\\|%%" method beg)
+    (while (string-match "%{\\([^}]+\\)}\\|'%s'\\|%s\\|%t\\|%%" method beg)
       (push (substring method beg (match-beginning 0)) out)
       (setq beg (match-end 0)
            total (match-string 0 method)
@@ -782,7 +782,7 @@ external if displayed external."
       (cond
        ((string= total "%%")
        (push "%" out))
-       ((string= total "%s")
+       ((or (string= total "%s") (string= total "'%s'"))
        (setq uses-stdin nil)
        (push (mm-quote-arg
               (gnus-map-function mm-path-name-rewrite-functions file)) out))