annotate lisp/ilisp/ilisp-bug.el @ 123:c77884c6318d

Added tag r20-1b14 for changeset d2f30a177268
author cvs
date Mon, 13 Aug 2007 09:26:04 +0200
parents b82b59fe008d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 ;;; -*- Mode: Emacs-Lisp -*-
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 ;;; ilisp-bug.el --
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 ;;; This file is part of ILISP.
4
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents: 0
diff changeset
6 ;;; Version: 5.8
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 ;;; Copyright (C) 1990, 1991, 1992, 1993 Chris McConnell
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 ;;; 1993, 1994 Ivan Vasquez
4
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents: 0
diff changeset
10 ;;; 1994, 1995, 1996 Marco Antoniotti and Rick Busdiecker
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents: 0
diff changeset
11 ;;; 1996 Marco Antoniotti and Rick Campbell
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 ;;; Other authors' names for which this Copyright notice also holds
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 ;;; may appear later in this file.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 ;;;
4
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents: 0
diff changeset
16 ;;; Send mail to 'ilisp-request@naggum.no' to be included in the
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents: 0
diff changeset
17 ;;; ILISP mailing list. 'ilisp@naggum.no' is the general ILISP
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 ;;; mailing list were bugs and improvements are discussed.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 ;;; ILISP is freely redistributable under the terms found in the file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21 ;;; COPYING.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 ;;; ILISP bug stuff.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 ;;;%Bugs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 (defun ilisp-bug ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 "Generate an ilisp bug report."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 (let ((buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 (if (y-or-n-p
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 (format "Is %s the buffer where the error occurred? "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 (buffer-name (current-buffer))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 (current-buffer))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 (if (or (not buffer) (not (mail)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 (message
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 (if buffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 "Can't send bug report until mail buffer is empty."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 "Switch to the buffer where the error occurred."))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 (beep))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 (insert ilisp-bugs-to)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 (search-forward (concat "\n" mail-header-separator "\n"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 (insert "\nYour problem: \n\n")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 (insert "Type C-c C-c to send\n")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 (insert "======= Emacs state below: for office use only =======\n")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 (forward-line 1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 (insert (emacs-version))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 (insert
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 (format "\nWindow System: %s %s" window-system window-system-version))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 (let ((mode (save-excursion (set-buffer buffer) major-mode))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55 (match "popper-\\|completer-")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 (val-buffer buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57 string)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 (if (or (memq mode lisp-source-modes) (memq mode ilisp-modes))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 (setq match (concat "ilisp-\\|comint-\\|lisp-" match)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61 val-buffer (save-excursion (set-buffer buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62 (or (ilisp-buffer) buffer)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 (mapcar (function (lambda (dialect)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64 (setq match (concat (format "%s-\\|" (car dialect))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 match))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66 ilisp-dialects)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 (set-buffer buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69 (let ((point (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 (start (lisp-defun-begin))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 (end (lisp-end-defun-text t)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 (setq string
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 (format "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 Mode: %s
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75 Start: %s
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76 End: %s
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 Point: %s
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78 Point-max: %s
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79 Code: %s"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80 major-mode start end point (point-max)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 (buffer-substring start end)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82 (insert string)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83 (mapatoms
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84 (function (lambda (symbol)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85 (if (and (boundp symbol)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86 (string-match match (format "%s" symbol))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87 (not (eq symbol 'ilisp-documentation)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88 (let ((val (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89 (set-buffer val-buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90 (symbol-value symbol))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91 (if val
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92 (insert (format "\n%s: %s" symbol val))))))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93 (insert (format "\nLossage: %s" (key-description (recent-keys))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94 (if (and (or (memq mode lisp-source-modes)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95 (memq mode ilisp-modes))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96 (ilisp-buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97 (memq 'clisp (ilisp-value 'ilisp-dialect t))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98 (not (cdr (ilisp-value 'comint-send-queue))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100 (insert (format "\nLISP: %s"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101 (comint-remove-whitespace
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102 (car (comint-send
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104 (set-buffer buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105 (ilisp-process))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106 "(lisp-implementation-version)"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107 t t 'version)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108 (insert (format "\n*FEATURES*: %s"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109 (comint-remove-whitespace
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110 (car (comint-send
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112 (set-buffer buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
113 (ilisp-process))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114 "(let ((*print-length* nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115 (*print-level* nil))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116 (print *features*)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117 nil)"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118 t t 'version)))))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119 (insert ?\n)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121 (re-search-forward "^Subject")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122 (end-of-line)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123 (message "Send with sendmail or your favorite mail program.")))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124