branch: externals/debbugs
commit 3a253e968e0e109798a4d09bb5e6853c3d60959c
Author: Lars Magne Ingebrigtsen <[email protected]>
Commit: Lars Magne Ingebrigtsen <[email protected]>
(debbugs-toggle-tag): Save the list of tagged articles immediately.
Waiting until exit is too brittle.
---
ChangeLog | 2 ++
debbugs-gnu.el | 22 ++++++++--------------
2 files changed, 10 insertions(+), 14 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index c1aa135..b7be5e3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,6 +19,8 @@
(debbugs-send-control-message): Allow reversing tags.
(debbugs-summary-mode): Remove [email protected] from the
list, too.
+ (debbugs-toggle-tag): Save the list of tagged articles
+ immediately. Waiting until exit is too brittle.
2011-07-06 Stefan Monnier <[email protected]>
diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index bc800bb..120d9e8 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -151,19 +151,12 @@
(defun debbugs-dump-persistency-file ()
"Function to store debbugs variables persistently."
- (ignore-errors
- (with-temp-buffer
- (insert
- ";; -*- emacs-lisp -*-\n"
- ";; Debbugs tags connection history. Don't change this file.\n\n"
- (format "(setq debbugs-local-tags '%S)"
- (sort (copy-sequence debbugs-local-tags) '<)))
- (write-region
- (point-min) (point-max) debbugs-persistency-file))))
-
-;; Save variables.
-(unless noninteractive
- (add-hook 'kill-emacs-hook 'debbugs-dump-persistency-file))
+ (with-temp-file debbugs-persistency-file
+ (insert
+ ";; -*- emacs-lisp -*-\n"
+ ";; Debbugs tags connection history. Don't change this file.\n\n"
+ (format "(setq debbugs-local-tags '%S)"
+ (sort (copy-sequence debbugs-local-tags) '<)))))
(defvar debbugs-current-severities nil
"The severities strings to be searched for.")
@@ -516,7 +509,8 @@ The following commands are available:
(add-to-list 'debbugs-local-tags id)
(put-text-property
(+ (point) (- 5 (length (number-to-string id)))) (+ (point) 5)
- 'face 'debbugs-tagged)))))
+ 'face 'debbugs-tagged))))
+ (debbugs-dump-persistency-file))
(defun debbugs-suppress-done ()
"Suppress bugs marked as done."