Mercurial > emacs
annotate lisp/cedet/cedet-edebug.el @ 104470:6ccad1511df1
Minor whitespace changes and `require' fixes.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Sun, 06 Sep 2009 21:22:05 +0000 |
parents | 4af663a1c4ab |
children | 25e047f7f6a2 |
rev | line source |
---|---|
104407
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
1 ;;; cedet-edebug.el --- Special EDEBUG augmentation code |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
2 |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
3 ;;; Copyright (C) 2003, 2004, 2007, 2008 Free Software Foundation, Inc. |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
4 |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
5 ;; Author: Eric M. Ludlam <zappo@gnu.org> |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
6 ;; Version: 0.2 |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
7 ;; Keywords: OO, lisp |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
8 |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
9 ;; This file is part of GNU Emacs. |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
10 |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
11 ;; GNU Emacs is free software: you can redistribute it and/or modify |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
12 ;; it under the terms of the GNU General Public License as published by |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
13 ;; the Free Software Foundation, either version 3 of the License, or |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
14 ;; (at your option) any later version. |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
15 |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
16 ;; GNU Emacs is distributed in the hope that it will be useful, |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
19 ;; GNU General Public License for more details. |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
20 |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
21 ;; You should have received a copy of the GNU General Public License |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
22 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
23 |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
24 ;;; Commentary: |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
25 ;; |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
26 ;; Some aspects of EDEBUG are not extensible. It is possible to extend |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
27 ;; edebug through other means, such as alias or advice, but those don't stack |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
28 ;; very well when there are multiple tools trying to do the same sort of thing. |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
29 ;; |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
30 ;; This package provides a way to extend some aspects of edebug, such as value |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
31 ;; printing. |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
32 |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
33 ;;; Code: |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
34 (defvar cedet-edebug-prin1-extensions nil |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
35 "An alist of of code that can extend PRIN1 for edebug. |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
36 Each entry has the value: (CONDITION . PRIN1COMMAND).") |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
37 |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
38 (defun cedet-edebug-prin1-recurse (object) |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
39 "Recurse into OBJECT for prin1 on `cedet-edebug-prin1-to-string'." |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
40 (concat "(" (mapconcat 'cedet-edebug-prin1-to-string object " ") ")")) |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
41 |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
42 (defun cedet-edebug-rebuild-prin1 () |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
43 "Rebuild the function `cedet-edebug-prin1-to-string'. |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
44 Use the values of `cedet-edebug-prin1-extensions' as the means of |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
45 constructing the function." |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
46 (interactive) |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
47 (let ((c cedet-edebug-prin1-extensions) |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
48 (code nil)) |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
49 (while c |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
50 (setq code (append (list (list (car (car c)) |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
51 (cdr (car c)))) |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
52 code)) |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
53 (setq c (cdr c))) |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
54 (fset 'cedet-edebug-prin1-to-string-inner |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
55 `(lambda (object &optional noescape) |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
56 "Display eieio OBJECT in fancy format. Overrides the edebug default. |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
57 Optional argument NOESCAPE is passed to `prin1-to-string' when appropriate." |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
58 (cond |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
59 ,@(nreverse code) |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
60 (t (prin1-to-string object noescape))))) |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
61 )) |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
62 |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
63 (defun cedet-edebug-prin1-to-string (object &optional noescape) |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
64 "CEDET version of `edebug-prin1-to-string' that adds specialty |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
65 print methods for very large complex objects." |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
66 (if (not (fboundp 'cedet-edebug-prin1-to-string-inner)) |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
67 ;; Recreate the official fcn now. |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
68 (cedet-edebug-rebuild-prin1)) |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
69 |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
70 ;; Call the auto-generated version. |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
71 ;; This is not going to be available at compile time. |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
72 (with-no-warnings |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
73 (cedet-edebug-prin1-to-string-inner object noescape))) |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
74 |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
75 |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
76 (defun cedet-edebug-add-print-override (testfcn printfcn) |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
77 "Add a new EDEBUG print override. |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
78 TESTFCN is a routine that returns nil if the first argument |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
79 passed to it is not to use PRINTFCN. |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
80 PRINTFCN accepts an object identified by TESTFCN and |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
81 returns a string. |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
82 New tests are always added to the END of the list of tests. |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
83 See `cedet-edebug-prin1-extensions' for the official list." |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
84 (condition-case nil |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
85 (add-to-list 'cedet-edebug-prin1-extensions |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
86 (cons testfcn printfcn) |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
87 t) |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
88 (error ;; That failed, it must be an older version of Emacs |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
89 ;; withouth the append argument for `add-to-list' |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
90 ;; Doesn't handle the don't add twice case, but that's a |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
91 ;; development thing and developers probably use new emacsen. |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
92 (setq cedet-edebug-prin1-extensions |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
93 (append cedet-edebug-prin1-extensions |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
94 (list (cons testfcn printfcn)))))) |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
95 ;; whack the old implementation to force a rebuild. |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
96 (fmakunbound 'cedet-edebug-prin1-to-string-inner)) |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
97 |
104470
6ccad1511df1
Minor whitespace changes and `require' fixes.
Chong Yidong <cyd@stupidchicken.com>
parents:
104407
diff
changeset
|
98 ;;; NOTE TO SELF. Make this system used as an extension |
6ccad1511df1
Minor whitespace changes and `require' fixes.
Chong Yidong <cyd@stupidchicken.com>
parents:
104407
diff
changeset
|
99 ;;; and then autoload the below. |
6ccad1511df1
Minor whitespace changes and `require' fixes.
Chong Yidong <cyd@stupidchicken.com>
parents:
104407
diff
changeset
|
100 (add-hook 'edebug-setup-hook |
6ccad1511df1
Minor whitespace changes and `require' fixes.
Chong Yidong <cyd@stupidchicken.com>
parents:
104407
diff
changeset
|
101 (lambda () |
6ccad1511df1
Minor whitespace changes and `require' fixes.
Chong Yidong <cyd@stupidchicken.com>
parents:
104407
diff
changeset
|
102 (require 'cedet-edebug) |
6ccad1511df1
Minor whitespace changes and `require' fixes.
Chong Yidong <cyd@stupidchicken.com>
parents:
104407
diff
changeset
|
103 ;; I suspect this isn't the best way to do this, but when |
6ccad1511df1
Minor whitespace changes and `require' fixes.
Chong Yidong <cyd@stupidchicken.com>
parents:
104407
diff
changeset
|
104 ;; cust-print was used on my system all my objects |
6ccad1511df1
Minor whitespace changes and `require' fixes.
Chong Yidong <cyd@stupidchicken.com>
parents:
104407
diff
changeset
|
105 ;; appeared as "#1 =" which was not useful. This allows |
6ccad1511df1
Minor whitespace changes and `require' fixes.
Chong Yidong <cyd@stupidchicken.com>
parents:
104407
diff
changeset
|
106 ;; edebug to print my objects in the nice way they were |
6ccad1511df1
Minor whitespace changes and `require' fixes.
Chong Yidong <cyd@stupidchicken.com>
parents:
104407
diff
changeset
|
107 ;; meant to with `object-print' and `class-name' |
6ccad1511df1
Minor whitespace changes and `require' fixes.
Chong Yidong <cyd@stupidchicken.com>
parents:
104407
diff
changeset
|
108 (defalias 'edebug-prin1-to-string 'cedet-edebug-prin1-to-string) |
6ccad1511df1
Minor whitespace changes and `require' fixes.
Chong Yidong <cyd@stupidchicken.com>
parents:
104407
diff
changeset
|
109 ;; Add a fancy binding into EDEBUG's keymap for ADEBUG. |
6ccad1511df1
Minor whitespace changes and `require' fixes.
Chong Yidong <cyd@stupidchicken.com>
parents:
104407
diff
changeset
|
110 (define-key edebug-mode-map "A" 'data-debug-edebug-expr) |
6ccad1511df1
Minor whitespace changes and `require' fixes.
Chong Yidong <cyd@stupidchicken.com>
parents:
104407
diff
changeset
|
111 )) |
104407
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
112 |
104470
6ccad1511df1
Minor whitespace changes and `require' fixes.
Chong Yidong <cyd@stupidchicken.com>
parents:
104407
diff
changeset
|
113 ;;; DEBUG MODE TOO |
6ccad1511df1
Minor whitespace changes and `require' fixes.
Chong Yidong <cyd@stupidchicken.com>
parents:
104407
diff
changeset
|
114 ;; This seems like as good a place as any to stick this hack. |
6ccad1511df1
Minor whitespace changes and `require' fixes.
Chong Yidong <cyd@stupidchicken.com>
parents:
104407
diff
changeset
|
115 (add-hook 'debugger-mode-hook |
6ccad1511df1
Minor whitespace changes and `require' fixes.
Chong Yidong <cyd@stupidchicken.com>
parents:
104407
diff
changeset
|
116 (lambda () |
6ccad1511df1
Minor whitespace changes and `require' fixes.
Chong Yidong <cyd@stupidchicken.com>
parents:
104407
diff
changeset
|
117 (require 'cedet-edebug) |
6ccad1511df1
Minor whitespace changes and `require' fixes.
Chong Yidong <cyd@stupidchicken.com>
parents:
104407
diff
changeset
|
118 ;; Add a fancy binding into the debug mode map for ADEBUG. |
6ccad1511df1
Minor whitespace changes and `require' fixes.
Chong Yidong <cyd@stupidchicken.com>
parents:
104407
diff
changeset
|
119 (define-key debugger-mode-map "A" 'data-debug-edebug-expr) |
6ccad1511df1
Minor whitespace changes and `require' fixes.
Chong Yidong <cyd@stupidchicken.com>
parents:
104407
diff
changeset
|
120 )) |
104407
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
121 |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
122 (provide 'cedet-edebug) |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
123 |
4af663a1c4ab
cedet-cscope.el, cedet-edebug.el, cedet-global.el, cedet-idutils.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
124 ;;; cedet-edebug.el ends here |