1 ;;; -*- Mode: Emacs-Lisp -*-
6 ;;; This file is part of ILISP.
7 ;;; Please refer to the file COPYING for copyrights and licensing
9 ;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
10 ;;; of present and past contributors.
12 ;;; $Id: ilisp-bug.el,v 1.3 2001-07-02 09:40:45 youngs Exp $
16 "Generate an ilisp bug report."
20 (format "Is %s the buffer where the error occurred? "
21 (buffer-name (current-buffer))))
26 (progn (compose-mail) t)))
27 ; 19990615 Marco Antoniotti
28 ; Somebody complained that
29 ; MAIL does not use the mail
31 ; user. Here is an attempt to
34 ; 19990912 Hannu Koivisto
35 ; the IGNORE-ERRORS may
36 ; alleviate some quirks in the
38 ; cf. <ilisp@cons.org> post of
39 ; 19990908 for details.
44 "Can't send bug report until mail buffer is empty."
45 "Switch to the buffer where the error occurred."))
47 (insert ilisp-bugs-to)
48 (search-forward (concat "\n" mail-header-separator "\n"))
49 (insert "\nYour problem: \n\n")
50 (insert "Type C-c C-c to send\n")
51 (insert "======= Emacs state below: for office use only =======\n")
53 (insert (emacs-version))
55 (if (string-match "XEmacs" emacs-version)
56 (format "\nWindow System: %s" (console-type) ) ;; XEmacs has no window-system-version
57 (format "\nWindow System: %s %s" window-system window-system-version) ) )
58 (let ((mode (save-excursion (set-buffer buffer) major-mode))
59 (match "popper-\\|completer-")
62 (if (or (memq mode lisp-source-modes) (memq mode ilisp-modes))
64 (setq match (concat "ilisp-\\|comint-\\|lisp-" match)
65 val-buffer (save-excursion (set-buffer buffer)
66 (or (ilisp-buffer) buffer)))
67 (mapcar (function (lambda (dialect)
68 (setq match (concat (format "%s-\\|" (car dialect))
74 (start (lisp-defun-begin))
75 (end (lisp-end-defun-text t)))
84 major-mode start end point (point-max)
85 (buffer-substring start end)))))
88 (function (lambda (symbol)
89 (if (and (boundp symbol)
90 (string-match match (format "%s" symbol))
91 (not (eq symbol 'ilisp-documentation)))
92 (let ((val (save-excursion
93 (set-buffer val-buffer)
94 (symbol-value symbol))))
96 (insert (format "\n%s: %s" symbol val))))))))
97 (insert (format "\nLossage: %s" (key-description (recent-keys))))
98 (if (and (or (memq mode lisp-source-modes)
99 (memq mode ilisp-modes))
101 (memq 'clisp (ilisp-value 'ilisp-dialect t))
102 (not (cdr (ilisp-value 'comint-send-queue))))
104 (insert (format "\nLISP: %s"
105 (comint-remove-whitespace
110 "(lisp-implementation-version)"
112 (insert (format "\n*FEATURES*: %s"
113 (comint-remove-whitespace
118 "(let ((*print-length* nil)
124 (goto-char (point-min))
125 (re-search-forward "^Subject")
127 (message "Send with sendmail or your favorite mail program.")))))
129 ;;; end of file -- ilisp-bug.el --