annotate lisp/tooltalk/tooltalk-init.el @ 8:4b173ad71786 r19-15b5

Import from CVS: tag r19-15b5
author cvs
date Mon, 13 Aug 2007 08:47:35 +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 ;;; -*- 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 ;;; Registration of the default Tooltalk patterns and handlers.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 ;;; @(#)tooltalk-init.el 1.8 94/02/22
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 (defvar tooltalk-eval-pattern
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 '(category TT_HANDLE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 scope TT_SESSION
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 op "emacs-eval"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 callback tooltalk-eval-handler))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 (defvar tooltalk-load-file-pattern
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 '(category TT_HANDLE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 scope TT_SESSION
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 op "emacs-load-file"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 args ((TT_IN "file" "string"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 callback tooltalk-load-file-handler))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21 (defvar tooltalk-make-client-frame-pattern
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 '(category TT_HANDLE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 scope TT_SESSION
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 op "emacs-make-client-screen"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 callback tooltalk-make-client-frame-handler))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 (defvar tooltalk-status-pattern
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 '(category TT_HANDLE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 scope TT_SESSION
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 op "emacs-status"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 callback tooltalk-status-handler))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 (defvar initial-tooltalk-patterns ())
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 dispatch-initial-tooltalk-message (m)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 (let ((op (get-tooltalk-message-attribute m 'op))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 (patterns initial-tooltalk-patterns))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 (if (stringp op)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 (while patterns
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 (let ((p (car patterns)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 (if (eq (intern op) (tooltalk-pattern-prop-get p 'opsym))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 (let ((callback (tooltalk-pattern-prop-get p 'callback)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 (if callback (funcall callback m p))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 (setq patterns '()))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 (setq patterns (cdr patterns))))))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 (defun make-initial-tooltalk-pattern (args)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 (let ((opcdr (cdr (memq 'op args)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 (cbcdr (cdr (memq 'callback args))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 (if (and (consp opcdr) (consp cbcdr))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 (let ((plist (list 'opsym (intern (car opcdr)) 'callback (car cbcdr))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 (make-tooltalk-pattern (append args (list 'plist plist))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 (make-tooltalk-pattern args))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 (defun register-initial-tooltalk-patterns ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57 (mapcar #'register-tooltalk-pattern
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 (setq initial-tooltalk-patterns
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 (mapcar #'make-initial-tooltalk-pattern
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 (list tooltalk-eval-pattern
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61 tooltalk-load-file-pattern
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62 tooltalk-make-client-frame-pattern
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 tooltalk-status-pattern))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64 (add-hook 'tooltalk-unprocessed-message-hook 'dispatch-initial-tooltalk-message))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67 (defun unregister-initial-tooltalk-patterns ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 (mapcar 'destroy-tooltalk-pattern initial-tooltalk-patterns)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69 (setq initial-tooltalk-patterns ())
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 (remove-hook 'tooltalk-unprocessed-message-hook 'dispatch-initial-tooltalk-message))
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 (defun tooltalk:prin1-to-string (form)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 "Like prin1-to-string except: if the string contains embedded nulls (unlikely
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75 but possible) then replace each one with \"\\000\"."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76 (let ((string (prin1-to-string form)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 (let ((parts '())
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78 index)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79 (while (setq index (string-match "\0" string))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80 (setq parts
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 (apply 'list "\\000" (substring string 0 index) parts))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82 (setq string (substring string (1+ index))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83 (if (not parts)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84 string
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85 (setq parts (apply 'list string parts))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86 (apply 'concat (nreverse parts))))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88 ;; Backwards compatibility
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89 (fset 'tooltalk::prin1-to-string-carefully 'tooltalk:prin1-to-string)
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 tooltalk:read-from-string (str)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93 "Like read-from-string except: an error is signalled if the entire
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94 string can't be parsed."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95 (let ((res (read-from-string str)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96 (if (< (cdr res) (length str))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97 (error "Parse of input string ended prematurely."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98 str))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99 (car res)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102 (defun tooltalk::eval-string (str)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103 (let ((result (eval (car (read-from-string str)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104 (tooltalk:prin1-to-string result)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107 (defun tooltalk-eval-handler (msg pat)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108 (let ((str (get-tooltalk-message-attribute msg 'arg_val 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109 (result-str nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110 (failp t))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111 (unwind-protect
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112 (cond
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
113 ;; Assume That the emacs debugger will handle errors.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114 ;; If the user throws from the debugger to the cleanup
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115 ;; form below, failp will remain t.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116 (debug-on-error
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117 (setq result-str (tooltalk::eval-string str)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118 failp nil))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120 ;; If an error occurs as a result of evaluating
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121 ;; the string or printing the result, then we'll return
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122 ;; a string version of error-info.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123 (t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124 (condition-case error-info
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125 (setq result-str (tooltalk::eval-string str)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
126 failp nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
127 (error
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128 (let ((error-str (tooltalk:prin1-to-string error-info)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129 (setq result-str error-str
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
130 failp t))))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
131
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132 ;; If we get to this point and result-str is still nil, the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133 ;; user must have thrown out of the debuggger
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134 (let ((reply-type (if failp 'fail 'reply))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
135 (reply-value (or result-str "(debugger exit)")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
136 (set-tooltalk-message-attribute reply-value msg 'arg_val 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
137 (return-tooltalk-message msg reply-type)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
138
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
139
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
140 (defun tooltalk-make-client-frame-handler (m p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
141 (let ((nargs (get-tooltalk-message-attribute m 'args_count)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
142 (if (not (= 3 nargs))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
143 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
144 (set-tooltalk-message-attribute "wrong number of arguments" m 'status_string)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
145 (return-tooltalk-message m 'fail))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
146
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
147 ;; Note: relying on the fact that arg_ival is returned as a string
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
148
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
149 (let* ((name (get-tooltalk-message-attribute m 'arg_val 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
150 (window (get-tooltalk-message-attribute m 'arg_ival 1))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
151 (args (list (cons 'name name) (cons 'window-id window)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
152 (frame (make-frame args)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
153 (set-tooltalk-message-attribute (frame-name frame) m 'arg_val 2)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
154 (return-tooltalk-message m 'reply)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
155
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
156
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
157
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
158 (defun tooltalk-load-file-handler (m p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
159 (let ((path (get-tooltalk-message-attribute m 'file)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
160 (condition-case error-info
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
161 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
162 (load-file path)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
163 (return-tooltalk-message m 'reply))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
164 (error
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
165 (let ((error-string (tooltalk:prin1-to-string error-info)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
166 (set-tooltalk-message-attribute error-string m 'status_string)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
167 (return-tooltalk-message m 'fail))))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
168
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
169
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
170 (defun tooltalk-status-handler (m p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
171 (return-tooltalk-message m 'reply))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
172
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
173
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
174 ;; Hack the command-line.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
175
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
176 (defun command-line-do-tooltalk (arg)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
177 "Connect to the ToolTalk server."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
178 ; (setq command-line-args-left
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
179 ; (cdr (tooltalk-open-connection (cons (car command-line-args)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
180 ; command-line-args-left))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
181 (if (tooltalk-open-connection)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
182 (register-initial-tooltalk-patterns)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
183 (display-warning 'tooltalk "Warning: unable to connect to a ToolTalk server.")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
184
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
185 (setq command-switch-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
186 (append command-switch-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
187 '(("-tooltalk" . command-line-do-tooltalk))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
188
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
189 ;; Add some selection converters.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
190
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
191 (defun xselect-convert-to-ttprocid (selection type value)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
192 (let* ((msg (create-tooltalk-message))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
193 (ttprocid (get-tooltalk-message-attribute msg 'sender)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
194 (destroy-tooltalk-message msg)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
195 ttprocid
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
196 ))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
197
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
198 (defun xselect-convert-to-ttsession (selection type value)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
199 (let* ((msg (create-tooltalk-message))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
200 (ttsession (get-tooltalk-message-attribute msg 'session)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
201 (destroy-tooltalk-message msg)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
202 ttsession
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
203 ))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
204
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
205 (if (boundp 'selection-converter-alist)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
206 (setq selection-converter-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
207 (append
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
208 selection-converter-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
209 '((SPRO_PROCID . xselect-convert-to-ttprocid)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
210 (SPRO_SESSION . xselect-convert-to-ttsession)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
211 )))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
212 (setq selection-converter-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
213 '((SPRO_PROCID . xselect-convert-to-ttprocid)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
214 (SPRO_SESSION . xselect-convert-to-ttsession))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
215