emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

scratch/lexical-gnus 8b3eb67 5/6: * lisp/gnus/gnus-msg.el: Remove empty


From: Stefan Monnier
Subject: scratch/lexical-gnus 8b3eb67 5/6: * lisp/gnus/gnus-msg.el: Remove empty `unwind-protect`s
Date: Sat, 30 Jan 2021 12:35:26 -0500 (EST)

branch: scratch/lexical-gnus
commit 8b3eb67be31730fd0eefc482a5d2d3f85449f881
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    * lisp/gnus/gnus-msg.el: Remove empty `unwind-protect`s
    
    (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 | 107 +++++++++++++++++++++++---------------------------
 1 file changed, 50 insertions(+), 57 deletions(-)

diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el
index 278b1d9..9ca82f8 100644
--- a/lisp/gnus/gnus-msg.el
+++ b/lisp/gnus/gnus-msg.el
@@ -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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]