branch: externals/debbugs
commit f347ec7c9db85c2c70836c2bc350ee19ac35dfc0
Author: Lars Magne Ingebrigtsen <[email protected]>
Commit: Lars Magne Ingebrigtsen <[email protected]>
(debbugs-gnu-summary-mode): Make sure `gnus-article-copy' is alive.
---
ChangeLog | 1 +
debbugs-gnu.el | 34 ++++++++++++++++++----------------
2 files changed, 19 insertions(+), 16 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index e5d30bb..1a8cfe5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
* debbugs-gnu.el (debbugs-guess-current-id): New function.
(debbugs-gnu-send-control-message): Use it.
+ (debbugs-gnu-summary-mode): Make sure `gnus-article-copy' is alive.
2011-07-19 Michael Albinus <[email protected]>
diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index 60c8939..c42e115 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -714,22 +714,24 @@ The following commands are available:
(set (make-local-variable 'gnus-posting-styles)
`((".*"
(eval
- (with-current-buffer gnus-article-copy
- (set (make-local-variable 'message-prune-recipient-rules)
- '((".*@debbugs.*" "emacs-pretest-bug")
- (".*@debbugs.*" "bug-gnu-emacs")
- ("[0-9]+@debbugs.*" "[email protected]")
- ("[0-9]+@debbugs.*" "[email protected]")))
- (set (make-local-variable 'message-alter-recipients-function)
- (lambda (address)
- (if (string-match "\\([0-9]+\\)@donarmstrong" (car address))
- (let ((new (format "%[email protected]"
- (match-string 1 (car address)))))
- (cons new new))
- address)))
- ;; `gnus-posting-styles' is eval'ed after
- ;; `message-simplify-subject'. So we cannot use m-s-s.
- (setq subject ,debbugs-gnu-subject)))))))
+ (when (buffer-live-p gnus-article-copy)
+ (with-current-buffer gnus-article-copy
+ (set (make-local-variable 'message-prune-recipient-rules)
+ '((".*@debbugs.*" "emacs-pretest-bug")
+ (".*@debbugs.*" "bug-gnu-emacs")
+ ("[0-9]+@debbugs.*" "[email protected]")
+ ("[0-9]+@debbugs.*" "[email protected]")))
+ (set (make-local-variable 'message-alter-recipients-function)
+ (lambda (address)
+ (if (string-match "\\([0-9]+\\)@donarmstrong"
+ (car address))
+ (let ((new (format "%[email protected]"
+ (match-string 1 (car address)))))
+ (cons new new))
+ address)))
+ ;; `gnus-posting-styles' is eval'ed after
+ ;; `message-simplify-subject'. So we cannot use m-s-s.
+ (setq subject ,debbugs-gnu-subject))))))))
(defun debbugs-guess-current-id ()
"Guess the ID based on \"#23\"."