]> code.delx.au - gnu-emacs-elpa/commitdiff
Allow sending control messages offline
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 29 Feb 2016 07:15:39 +0000 (18:15 +1100)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 29 Feb 2016 07:15:39 +0000 (18:15 +1100)
* debbugs-gnu.el (debbugs-gnu-send-mail-function): New variable.
(debbugs-gnu-send-control-message): Use it to allow sending
control messages offline.

packages/debbugs/debbugs-gnu.el

index 8634ccc0800f7a7ee960c6c0020bcb6a2a4a0934..77f9cc52c03e6dfd9c01390a559db3de5c9f05f2 100644 (file)
@@ -1230,6 +1230,9 @@ MERGED is the list of bugs merged with this one."
           (re-search-forward "#\\([0-9]+\\)" nil t)))
      (string-to-number (match-string 1)))))
 
+(defvar debbugs-gnu-send-mail-function nil
+  "A function to send control messages from debbugs.")
+
 (defun debbugs-gnu-send-control-message (message &optional reverse)
   "Send a control message for the current bug report.
 You can set the severity or add a tag, or close the report.  If
@@ -1332,7 +1335,7 @@ removed instead."
                (format "tags %d%s %s\n"
                        id (if reverse " -" "")
                        message))))
-      (funcall send-mail-function)
+      (funcall (or debbugs-gnu-send-mail-function send-mail-function))
       (remhash id debbugs-cache-data)
       (message-goto-body)
       (message "Control message sent:\n%s"