aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2008-06-05 14:37:42 +0000
committerStefan Monnier2008-06-05 14:37:42 +0000
commitd346bf7e6a987a3a8c51856aa7732d0da9a6ca95 (patch)
treec131234b3a5e36633678f875857f42b34e867697
parentc006c0c8ccb5fb6552f2074715ecd97685337f2b (diff)
downloademacs-d346bf7e6a987a3a8c51856aa7732d0da9a6ca95.tar.gz
emacs-d346bf7e6a987a3a8c51856aa7732d0da9a6ca95.zip
* 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.
-rw-r--r--lisp/gnus/ChangeLog6
-rw-r--r--lisp/gnus/gnus-art.el2
-rw-r--r--lisp/gnus/gnus-util.el15
-rw-r--r--lisp/gnus/mm-decode.el3
4 files changed, 18 insertions, 8 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index e16b8613f1e..7f678b91b9e 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,9 @@
12008-06-05 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * gnus-util.el (gnus-read-shell-command): New function.
4 * mm-decode.el (mm-pipe-part):
5 * gnus-art.el (gnus-summary-save-in-pipe): Use it.
6
12008-06-05 Katsumi Yamaoka <yamaoka@jpl.org> 72008-06-05 Katsumi Yamaoka <yamaoka@jpl.org>
2 8
3 * message.el (message-disassociate-draft): Revert 2008-03-18 change. 9 * message.el (message-disassociate-draft): Revert 2008-03-18 change.
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index c6eeb1af61b..2dc95ea49f6 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -3944,7 +3944,7 @@ The directory to save in defaults to `gnus-article-save-directory'."
3944 gnus-last-shell-command) 3944 gnus-last-shell-command)
3945 ((stringp command) 3945 ((stringp command)
3946 command) 3946 command)
3947 (t (read-string 3947 (t (gnus-read-shell-command
3948 (format 3948 (format
3949 "Shell command on %s: " 3949 "Shell command on %s: "
3950 (if (and gnus-number-of-articles-to-be-saved 3950 (if (and gnus-number-of-articles-to-be-saved
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index a3275224e7f..88671693721 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -62,7 +62,7 @@
62(eval-and-compile 62(eval-and-compile
63 (cond 63 (cond
64 ;; Prefer `replace-regexp-in-string' (present in Emacs, XEmacs 21.5, 64 ;; Prefer `replace-regexp-in-string' (present in Emacs, XEmacs 21.5,
65 ;; SXEmacs 22.1.4) over `replace-in-string'. The later leads to inf-loops 65 ;; SXEmacs 22.1.4) over `replace-in-string'. The lalter leads to inf-loops
66 ;; on empty matches: 66 ;; on empty matches:
67 ;; (replace-in-string "foo" "/*$" "/") 67 ;; (replace-in-string "foo" "/*$" "/")
68 ;; (replace-in-string "xe" "\\(x\\)?" "") 68 ;; (replace-in-string "xe" "\\(x\\)?" "")
@@ -957,10 +957,10 @@ If there's no subdirectory, delete DIRECTORY as well."
957 (overlays-at pos))))))) 957 (overlays-at pos)))))))
958 958
959;;; Protected and atomic operations. dmoore@ucsd.edu 21.11.1996 959;;; Protected and atomic operations. dmoore@ucsd.edu 21.11.1996
960;;; The primary idea here is to try to protect internal datastructures 960;; The primary idea here is to try to protect internal datastructures
961;;; from becoming corrupted when the user hits C-g, or if a hook or 961;; from becoming corrupted when the user hits C-g, or if a hook or
962;;; similar blows up. Often in Gnus multiple tables/lists need to be 962;; similar blows up. Often in Gnus multiple tables/lists need to be
963;;; updated at the same time, or information can be lost. 963;; updated at the same time, or information can be lost.
964 964
965(defvar gnus-atomic-be-safe t 965(defvar gnus-atomic-be-safe t
966 "If t, certain operations will be protected from interruption by C-g.") 966 "If t, certain operations will be protected from interruption by C-g.")
@@ -979,7 +979,7 @@ variables and then do only the assignment atomically."
979(put 'gnus-atomic-progn 'lisp-indent-function 0) 979(put 'gnus-atomic-progn 'lisp-indent-function 0)
980 980
981(defmacro gnus-atomic-progn-assign (protect &rest forms) 981(defmacro gnus-atomic-progn-assign (protect &rest forms)
982 "Evaluate FORMS, but insure that the variables listed in PROTECT 982 "Evaluate FORMS, but ensure that the variables listed in PROTECT
983are not changed if anything in FORMS signals an error or otherwise 983are not changed if anything in FORMS signals an error or otherwise
984non-locally exits. The variables listed in PROTECT are updated atomically. 984non-locally exits. The variables listed in PROTECT are updated atomically.
985It is safe to use gnus-atomic-progn-assign with long computations. 985It is safe to use gnus-atomic-progn-assign with long computations.
@@ -1798,6 +1798,9 @@ is allowed once again. (Immediately, if `inhibit-quit' is nil.)"
1798 ;; that intends to handle the quit signal next time. 1798 ;; that intends to handle the quit signal next time.
1799 (eval '(ignore nil)))))) 1799 (eval '(ignore nil))))))
1800 1800
1801(defalias 'gnus-read-shell-command
1802 (if (fboundp 'read-shell-command) 'read-shell-command 'read-string))
1803
1801(provide 'gnus-util) 1804(provide 'gnus-util)
1802 1805
1803;; arch-tag: f94991af-d32b-4c97-8c26-ca12a934de49 1806;; arch-tag: f94991af-d32b-4c97-8c26-ca12a934de49
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el
index f9d8311c0c1..6ee254ac03e 100644
--- a/lisp/gnus/mm-decode.el
+++ b/lisp/gnus/mm-decode.el
@@ -1295,7 +1295,8 @@ text/\\(\\sw+\\)\\(?:\;\\s-*charset=\\(.+?\\)\\)?[\"'][^>]*>" nil t)
1295 "Pipe HANDLE to a process." 1295 "Pipe HANDLE to a process."
1296 (let* ((name (mail-content-type-get (mm-handle-type handle) 'name)) 1296 (let* ((name (mail-content-type-get (mm-handle-type handle) 'name))
1297 (command 1297 (command
1298 (read-string "Shell command on MIME part: " mm-last-shell-command))) 1298 (gnus-read-shell-command
1299 "Shell command on MIME part: " mm-last-shell-command)))
1299 (mm-with-unibyte-buffer 1300 (mm-with-unibyte-buffer
1300 (mm-insert-part handle) 1301 (mm-insert-part handle)
1301 (mm-add-meta-html-tag handle) 1302 (mm-add-meta-html-tag handle)