branch: externals/gnorb
commit 14ac82a17af00a16bb1890ce708e81b66f9e675d
Author: Eric Abrahamsen <[email protected]>
Commit: Stefan Monnier <[email protected]>
[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.
---
gnorb-gnus.el | 11 ++++-------
gnorb.el | 2 +-
2 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/gnorb-gnus.el b/gnorb-gnus.el
index 32410a5..16cf7ac 100644
--- a/gnorb-gnus.el
+++ b/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/gnorb.el b/gnorb.el
index dba4595..8bf57a4 100644
--- a/gnorb.el
+++ b/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 <[email protected]>