annotate lisp/eos/sun-eos-editor.el @ 172:a38aed19690b

Added tag r20-3b12 for changeset 929b76928fce
author cvs
date Mon, 13 Aug 2007 09:47:55 +0200
parents 376386a54a3c
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 ;;; sun-eos-editor.el --- Implements the XEmacs/SPARCworks editor protocol
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 ;; Copyright (C) 1995 Sun Microsystems, Inc.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 ;; Maintainer: Eduardo Pelegri-Llopart <eduardo.pelegri-llopart@Eng.Sun.COM>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6 ;; Author: Eduardo Pelegri-Llopart <eduardo.pelegri-llopart@Eng.Sun.COM>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 ;; Keywords: SPARCworks EOS Era on SPARCworks editor
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 ;;; Commentary:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 ;; Please send feedback to eduardo.pelegri-llopart@eng.sun.com
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 ;;; Code:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 (require 'eos-common "sun-eos-common")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 ;; ===============
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 ;; Editor protocol
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21 ;; message is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 ;; SPRO_Visit_File CONTEXT_UID filename lineno center==0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 (defvar eos::visit-file-pattern)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 (defvar eos::get-src-line-pattern)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 (defun eos::editor-startup ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 ;; Actions to do at startup time for eos-editor
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 (setq eos::visit-file-pattern
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 (eos::create-visit-file-pattern))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 (setq eos::get-src-line-pattern
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 (eos::create-get-src-line-pattern))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 (eos::register-get-src-line-pattern)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 (defun eos::visit-file-callback (msg pat)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 ;; A callback for a SPRO_Visit_File message
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 ;; really should be discarded in the pattern
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 (let* ((filename
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 (get-tooltalk-message-attribute msg 'arg_val 1))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 (lineno-dot
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 (read
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 (get-tooltalk-message-attribute msg 'arg_ival 2)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 (if (null (eos::find-line filename lineno-dot 'debugger-visit))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 (message "No frame to select"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 (return-tooltalk-message msg)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 ))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 (defun eos::create-visit-file-pattern ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 ;; Create Visit File pattern
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 (let* ((pattern-desc '(category TT_HANDLE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 scope TT_SESSION
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 class TT_REQUEST
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55 op "SPRO_Visit_File"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 callback eos::visit-file-callback))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57 (pattern (make-tooltalk-pattern pattern-desc))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 pattern
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 ))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62 (defun eos::register-visit-file-pattern ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 ;; Register Visit File pattern
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64 (register-tooltalk-pattern eos::visit-file-pattern))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66 (defun eos::unregister-visit-file-pattern ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67 ;; Unregister Visit File pattern
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 (unregister-tooltalk-pattern eos::visit-file-pattern))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 ;; ====================
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 ;; Auxiliary TT message to get source and lineno.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75 ;; message is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76 ;; SPRO_Get_Src_Line CONTEXT_UID (INOUT filename) (INOUT lineno)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80 (defun eos::get-src-line-callback (msg pat)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 ;; A callback for a SPRO_Get_Src_Line message
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82 ;; really should be discarded in the pattern
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83 (let* ((filename
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84 (buffer-file-name))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85 (lineno
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86 (format "%d" (eos::line-at (point)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87 (set-tooltalk-message-attribute filename msg 'arg_val 1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88 (set-tooltalk-message-attribute lineno msg 'arg_val 2)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89 (return-tooltalk-message msg)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90 ))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92 (defun eos::create-get-src-line-pattern ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93 ;; Create a pattern to get filename and lineno
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94 (let* ((pattern-desc '(category TT_HANDLE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95 scope TT_SESSION
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96 class TT_REQUEST
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97 op "SPRO_Get_Src_Line"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98 callback eos::get-src-line-callback))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99 (pattern (make-tooltalk-pattern pattern-desc))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100 )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101 pattern
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102 ))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104 (defun eos::register-get-src-line-pattern ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105 ;; Register Get Src Line pattern
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106 (register-tooltalk-pattern eos::get-src-line-pattern))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108 (defun eos::unregister-get-src-line-pattern ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109 ;; Unregister Get Src Line pattern
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110 (unregister-tooltalk-pattern eos::get-src-line-pattern))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112 (provide 'eos-editor)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
113
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114 ;;; sun-eos-debugger.el ends here