Mercurial > emacs
annotate lisp/emacs-lisp/eieio-datadebug.el @ 104489:25e047f7f6a2
Synch to Eric Ludlam's upstream CEDET repository.
* cedet/semantic/wisent/java-tags.el:
* cedet/semantic/wisent/javat-wy.el: New files.
* cedet/semantic/wisent/java.el:
* cedet/semantic/wisent/java-wy.el: Files removed.
* cedet/semantic/java.el (semantic-java-prototype-function)
(semantic-java-prototype-variable, semantic-java-prototype-type):
Doc fix
(java-mode::semantic-format-tag-prototype): Renamed from
semantic-format-prototype-tag, which didn't match the overloadable
function.
* cedet/semantic/bovine/c.el (semantic-c-dereference-namespace-alias):
Deal correctly with nested namespaces. Make sure type actually
exists in original namespace.
* cedet/semantic/lex-spp.el (semantic-lex-spp-hack-depth): New.
(semantic-lex-spp-lex-text-string): Use above to enable recursion.
* cedet/semantic/format.el: Whitespace cleanup.
(semantic-test-all-format-tag-functions): Move to end.
(semantic-format-tag-prototype, semantic-format-tag-name)
(semantic-format-tag-name-default): Revert to original upstream
positions.
* cedet/semantic/elp.el: File removed.
* cedet/semantic/analyze.el (semantic-adebug-analyze): New
function, moved here from semantic/adebug.
* cedet/semantic/adebug.el: Declare external semanticdb functions.
(semantic-adebug-analyze, semantic-adebug-edebug-expr): Deleted.
* emacs-lisp/eieio.el (eieio-unbound): Default value is now robust
to recompile.
* emacs-lisp/eieio-datadebug.el: Add eieio objects to the list of
data debug things to recognize.
* emacs-lisp/eieio-comp.el: Synch to upstream.
* cedet/data-debug.el: Don't require eieio and semantic/tag.
If eieio is loaded, require eieio-datadebug.
(data-debug-insert-ring-button): Do not be specific about the ring
contents.
(data-debug-thing-alist): Remove eieio and semantic specific
entries.
(data-debug-add-specialized-thing): New function.
* cedet/cedet.el: Update commentary.
* cedet/cedet-edebug.el: Require edebug and debug.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Sun, 13 Sep 2009 15:58:30 +0000 |
parents | a64f3429f0ac |
children |
rev | line source |
---|---|
104431
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
1 ;;; eieio-datadebug.el --- EIEIO extensions to the data debugger. |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
2 |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
3 ;; Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
4 |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
5 ;; Author: Eric M. Ludlam <zappo@gnu.org> |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
6 ;; Keywords: OO, lisp |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
7 |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
8 ;; This file is part of GNU Emacs. |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
9 |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
10 ;; GNU Emacs is free software: you can redistribute it and/or modify |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
11 ;; it under the terms of the GNU General Public License as published by |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
12 ;; the Free Software Foundation, either version 3 of the License, or |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
13 ;; (at your option) any later version. |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
14 |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
15 ;; GNU Emacs is distributed in the hope that it will be useful, |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
18 ;; GNU General Public License for more details. |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
19 |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
20 ;; You should have received a copy of the GNU General Public License |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
21 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
22 |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
23 ;;; Commentary: |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
24 ;; |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
25 ;; Extensions to data-debug for EIEIO objects. |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
26 ;; |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
27 |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
28 (require 'eieio) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
29 (require 'data-debug) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
30 |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
31 ;;; Code: |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
32 |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
33 (defun data-debug-insert-object-slots (object prefix) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
34 "Insert all the slots of OBJECT. |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
35 PREFIX specifies what to insert at the start of each line." |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
36 (let ((attrprefix (concat (make-string (length prefix) ? ) "] ")) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
37 ) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
38 (data-debug/eieio-insert-slots object attrprefix) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
39 ) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
40 ) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
41 |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
42 (defun data-debug-insert-object-slots-from-point (point) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
43 "Insert the object slots found at the object button at POINT." |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
44 (let ((object (get-text-property point 'ddebug)) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
45 (indent (get-text-property point 'ddebug-indent)) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
46 start |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
47 ) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
48 (end-of-line) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
49 (setq start (point)) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
50 (forward-char 1) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
51 (data-debug-insert-object-slots object |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
52 (concat (make-string indent ? ) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
53 "~ ")) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
54 (goto-char start) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
55 )) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
56 |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
57 (defun data-debug-insert-object-button (object prefix prebuttontext) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
58 "Insert a button representing OBJECT. |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
59 PREFIX is the text that preceeds the button. |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
60 PREBUTTONTEXT is some text between PREFIX and the object button." |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
61 (let ((start (point)) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
62 (end nil) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
63 (str (object-print object)) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
64 (tip (format "Object %s\nClass: %S\nParent(s): %S\n%d slots" |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
65 (object-name-string object) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
66 (object-class object) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
67 (class-parents (object-class object)) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
68 (length (object-slots object)) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
69 )) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
70 ) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
71 (insert prefix prebuttontext str) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
72 (setq end (point)) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
73 (put-text-property (- end (length str)) end 'face 'font-lock-keyword-face) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
74 (put-text-property start end 'ddebug object) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
75 (put-text-property start end 'ddebug-indent(length prefix)) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
76 (put-text-property start end 'ddebug-prefix prefix) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
77 (put-text-property start end 'help-echo tip) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
78 (put-text-property start end 'ddebug-function |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
79 'data-debug-insert-object-slots-from-point) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
80 (insert "\n") |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
81 ) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
82 ) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
83 |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
84 ;;; METHODS |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
85 ;; |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
86 ;; Each object should have an opportunity to show stuff about itself. |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
87 |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
88 (defmethod data-debug/eieio-insert-slots ((obj eieio-default-superclass) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
89 prefix) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
90 "Insert the slots of OBJ into the current DDEBUG buffer." |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
91 (data-debug-insert-thing (object-name-string obj) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
92 prefix |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
93 "Name: ") |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
94 (let* ((cl (object-class obj)) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
95 (cv (class-v cl))) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
96 (data-debug-insert-thing (class-constructor cl) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
97 prefix |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
98 "Class: ") |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
99 ;; Loop over all the public slots |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
100 (let ((publa (aref cv class-public-a)) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
101 (publd (aref cv class-public-d)) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
102 ) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
103 (while publa |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
104 (if (slot-boundp obj (car publa)) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
105 (let ((i (class-slot-initarg cl (car publa))) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
106 (v (eieio-oref obj (car publa)))) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
107 (data-debug-insert-thing |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
108 v prefix (concat |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
109 (if i (symbol-name i) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
110 (symbol-name (car publa))) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
111 " "))) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
112 ;; Unbound case |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
113 (let ((i (class-slot-initarg cl (car publa)))) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
114 (data-debug-insert-custom |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
115 "#unbound" prefix |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
116 (concat (if i (symbol-name i) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
117 (symbol-name (car publa))) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
118 " ") |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
119 'font-lock-keyword-face)) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
120 ) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
121 (setq publa (cdr publa) publd (cdr publd))) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
122 ))) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
123 |
104489
25e047f7f6a2
Synch to Eric Ludlam's upstream CEDET repository.
Chong Yidong <cyd@stupidchicken.com>
parents:
104431
diff
changeset
|
124 ;;; Augment the Data debug thing display list. |
25e047f7f6a2
Synch to Eric Ludlam's upstream CEDET repository.
Chong Yidong <cyd@stupidchicken.com>
parents:
104431
diff
changeset
|
125 (data-debug-add-specialized-thing (lambda (thing) (object-p thing)) |
25e047f7f6a2
Synch to Eric Ludlam's upstream CEDET repository.
Chong Yidong <cyd@stupidchicken.com>
parents:
104431
diff
changeset
|
126 #'data-debug-insert-object-button) |
25e047f7f6a2
Synch to Eric Ludlam's upstream CEDET repository.
Chong Yidong <cyd@stupidchicken.com>
parents:
104431
diff
changeset
|
127 |
104431
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
128 ;;; DEBUG METHODS |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
129 ;; |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
130 ;; A generic function to run DDEBUG on an object and popup a new buffer. |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
131 ;; |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
132 (defmethod data-debug-show ((obj eieio-default-superclass)) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
133 "Run ddebug against any EIEIO object OBJ" |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
134 (data-debug-new-buffer (format "*%s DDEBUG*" (object-name obj))) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
135 (data-debug-insert-object-slots obj "]")) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
136 |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
137 ;;; DEBUG FUNCTIONS |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
138 ;; |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
139 (defun eieio-debug-methodinvoke (method class) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
140 "Show the method invocation order for METHOD with CLASS object." |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
141 (interactive "aMethod: \nXClass Expression: ") |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
142 (let* ((eieio-pre-method-execution-hooks |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
143 (lambda (l) (throw 'moose l) )) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
144 (data |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
145 (catch 'moose (eieio-generic-call |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
146 method (list class)))) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
147 (buf (data-debug-new-buffer "*Method Invocation*")) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
148 (data2 (mapcar (lambda (sym) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
149 (symbol-function (car sym))) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
150 data))) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
151 (data-debug-insert-thing data2 ">" ""))) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
152 |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
153 (provide 'eieio-datadebug) |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
154 |
a64f3429f0ac
emacs-lisp/eieio-base.el, emacs-lisp/eieio-comp.el,
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
155 ;;; eieio-datadebug.el ends here |