aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/progmodes/cc-mode.el20
1 files changed, 19 insertions, 1 deletions
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index 5283cfea6eb..aa2a286dbe9 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -2220,6 +2220,7 @@ Key bindings:
2220 2220
2221;; reporter-submit-bug-report requires sendmail. 2221;; reporter-submit-bug-report requires sendmail.
2222(declare-function mail-position-on-field "sendmail" (field &optional soft)) 2222(declare-function mail-position-on-field "sendmail" (field &optional soft))
2223(declare-function mail-text "sendmail" ())
2223 2224
2224(defun c-submit-bug-report () 2225(defun c-submit-bug-report ()
2225 "Submit via mail a bug report on CC Mode." 2226 "Submit via mail a bug report on CC Mode."
@@ -2284,9 +2285,26 @@ Key bindings:
2284 vars) 2285 vars)
2285 (lambda () 2286 (lambda ()
2286 (run-hooks 'c-prepare-bug-report-hook) 2287 (run-hooks 'c-prepare-bug-report-hook)
2288 (let ((hook (get mail-user-agent 'hookvar)))
2289 (if hook
2290 (add-hook hook
2291 (lambda ()
2292 (save-excursion
2293 (mail-text)
2294 (unless (looking-at "Package: ")
2295 (insert "Package: " c-mode-bug-package "\n\n"))))
2296 nil t)))
2287 (save-excursion 2297 (save-excursion
2288 (or (mail-position-on-field "X-Debbugs-Package") 2298 (or (mail-position-on-field "X-Debbugs-Package")
2289 (insert c-mode-bug-package))) 2299 (insert c-mode-bug-package))
2300 ;; For mail clients that do not support X- headers.
2301 ;; Sadly reporter-submit-bug-report unconditionally adds
2302 ;; a blank line before SALUTATION, so we can't use that.
2303 ;; It is also sad that reporter offers no way to leave point
2304 ;; after this line we are now inserting.
2305 (mail-text)
2306 (or (looking-at "Package:")
2307 (insert "Package: " c-mode-bug-package)))
2290 (insert (format "Buffer Style: %s\nc-emacs-features: %s\n" 2308 (insert (format "Buffer Style: %s\nc-emacs-features: %s\n"
2291 style c-features))))))) 2309 style c-features)))))))
2292 2310