[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 072b620 2/2: [gnorb] Use unwind-protect around the trigger
From: |
Eric Abrahamsen |
Subject: |
[elpa] master 072b620 2/2: [gnorb] Use unwind-protect around the trigger process, bump to 1.5.4 |
Date: |
Thu, 24 May 2018 13:17:50 -0400 (EDT) |
branch: master
commit 072b6206c17e47e2eb3fb4bdffe9d32055491baa
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
[gnorb] Use unwind-protect around the trigger process, bump to 1.5.4
* packages/gnorb/gnorb-gnus.el (gnorb-gnus-incoming-do-todo): Was
using condition-case, but unwind-protect makes more sense.
We *always* want to clear out gnorb-gnus-mesage-info and
gnorb-gnus-capture-attachments, no matter what happens in the
trigger process.
---
packages/gnorb/gnorb-gnus.el | 11 ++++-------
packages/gnorb/gnorb.el | 2 +-
2 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/packages/gnorb/gnorb-gnus.el b/packages/gnorb/gnorb-gnus.el
index 32410a5..16cf7ac 100644
--- a/packages/gnorb/gnorb-gnus.el
+++ b/packages/gnorb/gnorb-gnus.el
@@ -550,7 +550,7 @@ you'll stay in the Gnus summary buffer."
:link ,link :date ,date :refs ,ref-msg-ids
:group ,group))
(gnorb-gnus-collect-all-attachments nil t)
- (condition-case err
+ (unwind-protect
(if id
(progn
(delete-other-windows)
@@ -617,12 +617,9 @@ you'll stay in the Gnus summary buffer."
(mail-header-id (gnus-data-header (gnus-data-find a)))
tags))
(gnus-summary-update-article a))))
- (error
- ;; If these are left populated after an error, it plays hell
- ;; with future trigger processes.
- (setq gnorb-gnus-message-info nil)
- (setq gnorb-gnus-capture-attachments nil)
- (signal (car err) (cdr err))))))
+ ;; No matter what, clear these two variables.
+ (setq gnorb-gnus-message-info nil)
+ (setq gnorb-gnus-capture-attachments nil))))
;;;###autoload
(defun gnorb-gnus-quick-reply ()
diff --git a/packages/gnorb/gnorb.el b/packages/gnorb/gnorb.el
index f30cda5..d436592 100644
--- a/packages/gnorb/gnorb.el
+++ b/packages/gnorb/gnorb.el
@@ -2,7 +2,7 @@
;; Copyright (C) 2018 Free Software Foundation, Inc.
-;; Version: 1.5.3
+;; Version: 1.5.4
;; Package-Requires: ((cl-lib "0.5"))
;; Maintainer: Eric Abrahamsen <address@hidden>