Mercurial > emacs
changeset 95586:64da3838a9aa
* 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.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Thu, 05 Jun 2008 14:37:42 +0000 |
parents | 862c7386145c |
children | cb8fbc8ef1c5 |
files | lisp/gnus/ChangeLog lisp/gnus/gnus-art.el lisp/gnus/gnus-util.el lisp/gnus/mm-decode.el |
diffstat | 4 files changed, 18 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog Thu Jun 05 11:35:10 2008 +0000 +++ b/lisp/gnus/ChangeLog Thu Jun 05 14:37:42 2008 +0000 @@ -1,3 +1,9 @@ +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.
--- a/lisp/gnus/gnus-art.el Thu Jun 05 11:35:10 2008 +0000 +++ b/lisp/gnus/gnus-art.el Thu Jun 05 14:37:42 2008 +0000 @@ -3944,7 +3944,7 @@ gnus-last-shell-command) ((stringp command) command) - (t (read-string + (t (gnus-read-shell-command (format "Shell command on %s: " (if (and gnus-number-of-articles-to-be-saved
--- a/lisp/gnus/gnus-util.el Thu Jun 05 11:35:10 2008 +0000 +++ b/lisp/gnus/gnus-util.el Thu Jun 05 14:37:42 2008 +0000 @@ -62,7 +62,7 @@ (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\\)?" "") @@ -957,10 +957,10 @@ (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.") @@ -979,7 +979,7 @@ (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. @@ -1798,6 +1798,9 @@ ;; 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
--- a/lisp/gnus/mm-decode.el Thu Jun 05 11:35:10 2008 +0000 +++ b/lisp/gnus/mm-decode.el Thu Jun 05 14:37:42 2008 +0000 @@ -1295,7 +1295,8 @@ "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)