]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/gnus/gnus-msg.el: Remove empty `unwind-protect`s
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 30 Jan 2021 05:45:22 +0000 (00:45 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 30 Jan 2021 17:31:16 +0000 (12:31 -0500)
(gnus-msg-mail, gnus-group-mail)
(gnus-group-news, gnus-summary-mail-other-window)
(gnus-summary-news-other-window): Remove empty `unwind-protect`.

lisp/gnus/gnus-msg.el

index 278b1d9d735356854511027b6e6c48310cfd5816..9ca82f881a8a996962c4da834fb63fe1a9682858 100644 (file)
@@ -519,12 +519,11 @@ instead."
          ;; Don't use posting styles corresponding to any existing group.
          (group-name gnus-newsgroup-name)
          mail-buf)
-      (unwind-protect
-         (progn
-           (let ((gnus-newsgroup-name ""))
-           (gnus-setup-message 'message
-             (message-mail to subject other-headers continue
-                           nil yank-action send-actions return-action)))))
+      (let ((gnus-newsgroup-name ""))
+       (gnus-setup-message
+        'message
+        (message-mail to subject other-headers continue
+                      nil yank-action send-actions return-action)))
       (when switch-action
        (setq mail-buf (current-buffer))
        (switch-to-buffer buf)
@@ -615,17 +614,15 @@ If ARG is 1, prompt for a group name to find the posting style."
        ;; make sure last viewed article doesn't affect posting styles:
        (gnus-article-copy)
        (buffer (current-buffer)))
-    (unwind-protect
-       (progn
-         (let ((gnus-newsgroup-name
-                (if arg
-                    (if (= 1 (prefix-numeric-value arg))
-                        (gnus-group-completing-read
-                         "Use posting style of group"
-                         nil (gnus-read-active-file-p))
-                      (gnus-group-group-name))
-                  "")))
-           (gnus-setup-message 'message (message-mail)))))))
+    (let ((gnus-newsgroup-name
+          (if arg
+              (if (= 1 (prefix-numeric-value arg))
+                  (gnus-group-completing-read
+                   "Use posting style of group"
+                   nil (gnus-read-active-file-p))
+                (gnus-group-group-name))
+            "")))
+      (gnus-setup-message 'message (message-mail)))))
 
 (defun gnus-group-news (&optional arg)
   "Start composing a news.
@@ -642,18 +639,17 @@ network.  The corresponding back end must have a `request-post' method."
        ;; make sure last viewed article doesn't affect posting styles:
        (gnus-article-copy)
        (buffer (current-buffer)))
-    (unwind-protect
-       (progn
-         (let ((gnus-newsgroup-name
-               (if arg
-                   (if (= 1 (prefix-numeric-value arg))
-                       (gnus-group-completing-read "Use group"
-                                                   nil
-                                                   (gnus-read-active-file-p))
-                     (gnus-group-group-name))
-                 "")))
-         (gnus-setup-message 'message
-           (message-news (gnus-group-real-name gnus-newsgroup-name))))))))
+    (let ((gnus-newsgroup-name
+          (if arg
+              (if (= 1 (prefix-numeric-value arg))
+                  (gnus-group-completing-read "Use group"
+                                              nil
+                                              (gnus-read-active-file-p))
+                (gnus-group-group-name))
+            "")))
+      (gnus-setup-message
+       'message
+       (message-news (gnus-group-real-name gnus-newsgroup-name))))))
 
 (defun gnus-group-post-news (&optional arg)
   "Start composing a message (a news by default).
@@ -686,17 +682,15 @@ posting style."
        ;; make sure last viewed article doesn't affect posting styles:
        (gnus-article-copy)
        (buffer (current-buffer)))
-    (unwind-protect
-       (progn
-         (let ((gnus-newsgroup-name
-               (if arg
-                   (if (= 1 (prefix-numeric-value arg))
-                       (gnus-group-completing-read "Use group"
-                                                   nil
-                                                   (gnus-read-active-file-p))
-                     "")
-                 gnus-newsgroup-name)))
-         (gnus-setup-message 'message (message-mail)))))))
+    (let ((gnus-newsgroup-name
+          (if arg
+              (if (= 1 (prefix-numeric-value arg))
+                  (gnus-group-completing-read "Use group"
+                                              nil
+                                              (gnus-read-active-file-p))
+                "")
+            gnus-newsgroup-name)))
+      (gnus-setup-message 'message (message-mail)))))
 
 (defun gnus-summary-news-other-window (&optional arg)
   "Start composing a news in another window.
@@ -713,23 +707,22 @@ network.  The corresponding back end must have a `request-post' method."
        ;; make sure last viewed article doesn't affect posting styles:
        (gnus-article-copy)
        (buffer (current-buffer)))
-    (unwind-protect
-       (progn
-         (let ((gnus-newsgroup-name
-               (if arg
-                   (if (= 1 (prefix-numeric-value arg))
-                       (gnus-group-completing-read "Use group"
-                                                   nil
-                                                   (gnus-read-active-file-p))
-                     "")
-                 gnus-newsgroup-name)))
-         (gnus-setup-message 'message
-           (progn
-             (message-news (gnus-group-real-name gnus-newsgroup-name))
-              (setq-local gnus-discouraged-post-methods
-                          (remove
-                           (car (gnus-find-method-for-group gnus-newsgroup-name))
-                           gnus-discouraged-post-methods)))))))))
+    (let ((gnus-newsgroup-name
+          (if arg
+              (if (= 1 (prefix-numeric-value arg))
+                  (gnus-group-completing-read "Use group"
+                                              nil
+                                              (gnus-read-active-file-p))
+                "")
+            gnus-newsgroup-name)))
+      (gnus-setup-message
+       'message
+       (progn
+        (message-news (gnus-group-real-name gnus-newsgroup-name))
+        (setq-local gnus-discouraged-post-methods
+                    (remove
+                     (car (gnus-find-method-for-group gnus-newsgroup-name))
+                     gnus-discouraged-post-methods)))))))
 
 (defun gnus-summary-post-news (&optional arg)
   "Start composing a message.  Post to the current group by default.