* mm-util.el (mm-quote-arg): Remove.
authorJesper Harder <harder@ifa.au.dk>
Mon, 5 Jan 2004 22:16:58 +0000 (22:16 +0000)
committerJesper Harder <harder@ifa.au.dk>
Mon, 5 Jan 2004 22:16:58 +0000 (22:16 +0000)
* mm-decode.el (mm-mailcap-command): Replace mm-quote-arg with
shell-quote-argument.

* gnus-uu.el (gnus-uu-command): do.

* gnus-sum.el (gnus-summary-insert-pseudos): do.

* ietf-drums.el (ietf-drums-token-to-list): Replace mm-make-char
with make-char.

* mm-util.el (mm-make-char): Remove.

* gnus-sum.el (gnus-dead-summary-mode): do.

lisp/ChangeLog
lisp/gnus-sum.el
lisp/gnus-uu.el
lisp/ietf-drums.el
lisp/mm-decode.el
lisp/mm-util.el

index 160892f..9d5fcf1 100644 (file)
@@ -1,5 +1,19 @@
 2004-01-05  Jesper Harder  <harder@ifa.au.dk>
 
+       * mm-util.el (mm-quote-arg): Remove.
+
+       * mm-decode.el (mm-mailcap-command): Replace mm-quote-arg with
+       shell-quote-argument.
+
+       * gnus-uu.el (gnus-uu-command): do.
+
+       * gnus-sum.el (gnus-summary-insert-pseudos): do.
+
+       * ietf-drums.el (ietf-drums-token-to-list): Replace mm-make-char
+       with make-char.
+
+       * mm-util.el (mm-make-char): Remove.
+
        * mml.el (mml-mode): Replace gnus-add-minor-mode with
        add-minor-mode.
 
index 55782db..34b4ab5 100644 (file)
@@ -11053,7 +11053,7 @@ If REVERSE, save parts that do not match TYPE."
                                (lambda (f)
                                  (if (equal f " ")
                                      f
-                                   (mm-quote-arg f)))
+                                   (shell-quote-argument f)))
                                files " ")))))
          (setq ps (cdr ps)))))
     (if (and gnus-view-pseudos (not not-view))
index 6eb0b01..43bc15f 100644 (file)
@@ -1776,7 +1776,7 @@ Gnus might fail to display all of it.")
 ;; that the filename will be treated as a single argument when the shell
 ;; executes the command.
 (defun gnus-uu-command (action file)
-  (let ((quoted-file (mm-quote-arg file)))
+  (let ((quoted-file (shell-quote-argument file)))
     (if (string-match "%s" action)
        (format action quoted-file)
       (concat action " " quoted-file))))
index c546316..eec283b 100644 (file)
@@ -88,14 +88,14 @@ backslash and doublequote.")
          (push c out)))
        (range
        (while (<= b c)
-         (push (mm-make-char 'ascii b) out)
+         (push (make-char 'ascii b) out)
          (incf b))
        (setq range nil))
        ((= i (length token))
-       (push (mm-make-char 'ascii c) out))
+       (push (make-char 'ascii c) out))
        (t
        (when b
-         (push (mm-make-char 'ascii b) out))
+         (push (make-char 'ascii b) out))
        (setq b c))))
     (nreverse out)))
 
index 5d7f013..1a8fc46 100644 (file)
@@ -833,16 +833,16 @@ external if displayed external."
            (string= total "'%s'")
            (string= total "\"%s\""))
        (setq uses-stdin nil)
-       (push (mm-quote-arg
+       (push (shell-quote-argument
               (gnus-map-function mm-path-name-rewrite-functions file)) out))
        ((string= total "%t")
-       (push (mm-quote-arg (car type-list)) out))
+       (push (shell-quote-argument (car type-list)) out))
        (t
-       (push (mm-quote-arg (or (cdr (assq (intern sub) ctl)) "")) out))))
+       (push (shell-quote-argument (or (cdr (assq (intern sub) ctl)) "")) out))))
     (push (substring method beg (length method)) out)
     (when uses-stdin
       (push "<" out)
-      (push (mm-quote-arg
+      (push (shell-quote-argument
             (gnus-map-function mm-path-name-rewrite-functions file))
            out))
     (mapconcat 'identity (nreverse out) "")))
index cbd85b1..b560d09 100644 (file)
@@ -44,9 +44,6 @@
      (coding-system-equal . equal)
      (annotationp . ignore)
      (set-buffer-file-coding-system . ignore)
-     (make-char
-      . (lambda (charset int)
-         (int-to-char int)))
      (read-charset
       . (lambda (prompt)
          "Return a charset."
@@ -672,21 +669,6 @@ Equivalent to `progn' in XEmacs"
                                       mm-mime-mule-charset-alist)))))
            (list 'ascii (or charset 'latin-iso8859-1)))))))))
 
-(if (fboundp 'shell-quote-argument)
-    (defalias 'mm-quote-arg 'shell-quote-argument)
-  (defun mm-quote-arg (arg)
-    "Return a version of ARG that is safe to evaluate in a shell."
-    (let ((pos 0) new-pos accum)
-      ;; *** bug: we don't handle newline characters properly
-      (while (setq new-pos (string-match "[]*[;!'`\"$\\& \t{} |()<>]" arg pos))
-       (push (substring arg pos new-pos) accum)
-       (push "\\" accum)
-       (push (list (aref arg new-pos)) accum)
-       (setq pos (1+ new-pos)))
-      (if (= pos 0)
-         arg
-       (apply 'concat (nconc (nreverse accum) (list (substring arg pos))))))))
-
 (defun mm-auto-mode-alist ()
   "Return an `auto-mode-alist' with only the .gz (etc) thingies."
   (let ((alist auto-mode-alist)