+2011-07-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * debbugs-gnu.el (debbugs-guess-current-id): New function.
+ (debbugs-gnu-send-control-message): Use it.
+
2011-07-19 Michael Albinus <michael.albinus@gmx.de>
* debbugs-gnu.el (debbugs-gnu-default-suppress-bugs): New customer
(debbugs-gnu-mode)
(let ((inhibit-read-only t)
(debbugs-port "gnu.org"))
-
(erase-buffer)
(set (make-local-variable 'debbugs-gnu-current-widget)
widget)
;; `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\"."
+ (save-excursion
+ (beginning-of-line)
+ (and
+ (or (re-search-forward "#\\([0-9]+\\)" (line-end-position) t)
+ (progn
+ (goto-char (point-min))
+ (re-search-forward "#\\([0-9]+\\)" nil t)))
+ (string-to-number (match-string 1)))))
+
(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
nil t)
current-prefix-arg))
(let* ((id (or debbugs-gnu-bug-number ; Set on group entry.
+ (debbugs-guess-current-id)
(debbugs-gnu-current-id)))
(version
(when (member message '("close" "done"))