annotate lisp/sunpro/sunpro-sparcworks.el @ 147:e186c2b7192d xemacs-20-2

Added tag r20-2p1 for changeset 2af401a6ecca
author cvs
date Mon, 13 Aug 2007 09:34:48 +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 ;;; sunpro-sparcworks.el --- support SPARCworks manager ToolTalk messages
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) 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 ;; Author: Vladimir Ivanovic <vladimir@Eng.Sun.COM>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6 ;; Maintainer: Vladimir Ivanovic <vladimir@Eng.Sun.COM>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 ;; Created: 20 Mar 95
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 ;; Keywords: SPARCworks, ToolTalk, messages
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 ;;; Commentary:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 ;; Called from the SPARCworks Manager with the command:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 ;; xemacs -q -l sunpro-sparcworks $SUNPRO_SWM_TT_ARGS $SUNPRO_SWM_GUI_ARGS
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 ;;; To Do:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 ;;; Code:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 (require 'cl) ; Common Lisp compatibility
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 (require 'cl-19) ; Version for XEmacs 19
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 (defvar sunpro-sparcworks-ops
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 '("quit"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 "hide"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 "expose"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 "PEI_CLOSE"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 "PEI_OPEN"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 "PEI_NOP")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 "The ToolTalk operations that are handled.")
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 sunpro-sparcworks-callbacks
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 '(sp-sw-quit-handler
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 sp-sw-hide-handler
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 sp-sw-expose-handler
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 sp-sw-close-handler
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 sp-sw--open-handler
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 sp-sw-nop-handler)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 "The ToolTalk operations that are handled.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 (defvar sunpro-sparcworks-invocation-count nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 "The number of XEmacsen invoked via the SPARCworks Manager.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 (defun sp-sw-quit-handler (msg pat)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 (return-tooltalk-message msg 'reply)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 (save-buffers-kill-emacs))
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 sp-sw-hide-handler (msg pat)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 (return-tooltalk-message msg 'reply)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 (mapcar #'make-frame-invisible (frame-list)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 (defun sp-sw-expose-handler (msg pat)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55 (return-tooltalk-message msg 'reply)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 (mapcar #'make-frame-visible (frame-list)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 (defun sp-sw-close-handler (msg pat)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 (return-tooltalk-message msg 'reply)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 (mapcar #'iconify-frame (frame-list)))
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 sp-sw-open-handler (msg pat)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 (return-tooltalk-message msg 'reply)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64 (mapcar #'deiconify-frame (frame-list)))
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 sp-sw-nop-handler (msg pat)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67 (return-tooltalk-message msg 'reply)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 '())
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 (register-tooltalk-pattern
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 (make-tooltalk-pattern
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 '(category TT_HANDLE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 scope TT_SESSION
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 op "quit"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75 callback sp-sw-quit-handler)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 (register-tooltalk-pattern
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78 (make-tooltalk-pattern
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79 '(category TT_HANDLE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80 scope TT_SESSION
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 op "hide"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82 callback sp-sw-hide-handler)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84 (register-tooltalk-pattern
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85 (make-tooltalk-pattern
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86 '(category TT_HANDLE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87 scope TT_SESSION
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88 op "expose"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89 callback sp-sw-expose-handler)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91 (register-tooltalk-pattern
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92 (make-tooltalk-pattern
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93 '(category TT_HANDLE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94 scope TT_SESSION
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95 op "PEI_CLOSE"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96 callback sp-sw-close-handler)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98 (register-tooltalk-pattern
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99 (make-tooltalk-pattern
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100 '(category TT_HANDLE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101 scope TT_SESSION
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102 op "PEI_OPEN"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103 callback sp-sw-open-handler)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105 (register-tooltalk-pattern
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106 (make-tooltalk-pattern
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107 '(category TT_HANDLE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108 scope TT_SESSION
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109 op "PEI_NOP"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110 callback sp-sw-nop-handler)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112 (defun sunpro-sparcworks-handle-command-line (arg)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
113 "Handle the SPARCworks Manager-specific command line arguments."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114 (setq *sunpro-sparcworks-invocation-count* arg)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115 ;;Fix up the command-line in case there are more arguments
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116 (setq command-line-args-left
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117 (cdr command-line-args-left)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120 ;;; Initialize
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121 (setq command-switch-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122 (purecopy
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123 (append '(("-swtm" . sunpro-sparcworks-handle-command-line))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124 command-switch-alist)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
126
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
127 ;;; sunpro-sparcworks.el ends here
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128