Function: c-submit-bug-report
c-submit-bug-report is an interactive and byte-compiled function
defined in cc-mode.el.gz.
Signature
(c-submit-bug-report)
Documentation
Submit via mail a bug report on CC Mode.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/cc-mode.el.gz
(defun c-submit-bug-report ()
"Submit via mail a bug report on CC Mode."
(interactive)
(require 'reporter)
;; load in reporter
(let ((reporter-prompt-for-summary-p t)
(reporter-dont-compact-list '(c-offsets-alist))
(style c-indentation-style)
(c-features c-emacs-features))
(and
(if (y-or-n-p "Do you want to submit a report on CC Mode? ")
t (message "") nil)
(reporter-submit-bug-report
c-mode-help-address
(concat "CC Mode " c-version " (" mode-name ")")
(let ((vars (append
c-style-variables
'(c-buffer-is-cc-mode
c-tab-always-indent
c-syntactic-indentation
c-syntactic-indentation-in-macros
c-ignore-auto-fill
c-auto-align-backslashes
c-backspace-function
c-delete-function
c-electric-pound-behavior
c-default-style
c-enable-xemacs-performance-kludge-p
c-old-style-variable-behavior
defun-prompt-regexp
tab-width
comment-column
parse-sexp-ignore-comments
parse-sexp-lookup-properties
lookup-syntax-properties
;; A brain-damaged XEmacs only variable that, if
;; set to nil can cause all kinds of chaos.
signal-error-on-buffer-boundary
;; Variables that affect line breaking and comments.
auto-fill-mode
auto-fill-function
filladapt-mode
comment-multi-line
comment-start-skip
fill-prefix
fill-column
paragraph-start
adaptive-fill-mode
adaptive-fill-regexp)
nil)))
(mapc (lambda (var) (unless (boundp var)
(setq vars (delq var vars))))
'(signal-error-on-buffer-boundary
filladapt-mode
defun-prompt-regexp
font-lock-mode
auto-fill-mode
font-lock-maximum-decoration
parse-sexp-lookup-properties
lookup-syntax-properties))
vars)
(lambda ()
(run-hooks 'c-prepare-bug-report-hook)
(let ((hook (get mail-user-agent 'hookvar)))
(if hook
(add-hook hook
(lambda ()
(save-excursion
(mail-text)
(unless (looking-at "Package: ")
(insert "Package: " c-mode-bug-package "\n\n"))))
nil t)))
(save-excursion
(or (mail-position-on-field "X-Debbugs-Package")
(insert c-mode-bug-package))
;; For mail clients that do not support X- headers.
;; Sadly reporter-submit-bug-report unconditionally adds
;; a blank line before SALUTATION, so we can't use that.
;; It is also sad that reporter offers no way to leave point
;; after this line we are now inserting.
(mail-text)
(or (looking-at "Package:")
(insert "Package: " c-mode-bug-package)))
(insert (format "Buffer Style: %s\nc-emacs-features: %s\n"
style c-features)))))))