+2008-06-05 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * gnus-util.el (gnus-read-shell-command): New function.
+ * mm-decode.el (mm-pipe-part):
+ * gnus-art.el (gnus-summary-save-in-pipe): Use it.
+
2008-06-05 Katsumi Yamaoka <yamaoka@jpl.org>
* message.el (message-disassociate-draft): Revert 2008-03-18 change.
(eval-and-compile
(cond
;; Prefer `replace-regexp-in-string' (present in Emacs, XEmacs 21.5,
- ;; SXEmacs 22.1.4) over `replace-in-string'. The later leads to inf-loops
+ ;; SXEmacs 22.1.4) over `replace-in-string'. The lalter leads to inf-loops
;; on empty matches:
;; (replace-in-string "foo" "/*$" "/")
;; (replace-in-string "xe" "\\(x\\)?" "")
(overlays-at pos)))))))
;;; Protected and atomic operations. dmoore@ucsd.edu 21.11.1996
-;;; The primary idea here is to try to protect internal datastructures
-;;; from becoming corrupted when the user hits C-g, or if a hook or
-;;; similar blows up. Often in Gnus multiple tables/lists need to be
-;;; updated at the same time, or information can be lost.
+;; The primary idea here is to try to protect internal datastructures
+;; from becoming corrupted when the user hits C-g, or if a hook or
+;; similar blows up. Often in Gnus multiple tables/lists need to be
+;; updated at the same time, or information can be lost.
(defvar gnus-atomic-be-safe t
"If t, certain operations will be protected from interruption by C-g.")
(put 'gnus-atomic-progn 'lisp-indent-function 0)
(defmacro gnus-atomic-progn-assign (protect &rest forms)
- "Evaluate FORMS, but insure that the variables listed in PROTECT
+ "Evaluate FORMS, but ensure that the variables listed in PROTECT
are not changed if anything in FORMS signals an error or otherwise
non-locally exits. The variables listed in PROTECT are updated atomically.
It is safe to use gnus-atomic-progn-assign with long computations.
;; that intends to handle the quit signal next time.
(eval '(ignore nil))))))
+(defalias 'gnus-read-shell-command
+ (if (fboundp 'read-shell-command) 'read-shell-command 'read-string))
+
(provide 'gnus-util)
;; arch-tag: f94991af-d32b-4c97-8c26-ca12a934de49
"Pipe HANDLE to a process."
(let* ((name (mail-content-type-get (mm-handle-type handle) 'name))
(command
- (read-string "Shell command on MIME part: " mm-last-shell-command)))
+ (gnus-read-shell-command
+ "Shell command on MIME part: " mm-last-shell-command)))
(mm-with-unibyte-buffer
(mm-insert-part handle)
(mm-add-meta-html-tag handle)