annotate lisp/modes/view-process-xemacs.el @ 172:a38aed19690b

Added tag r20-3b12 for changeset 929b76928fce
author cvs
date Mon, 13 Aug 2007 09:47:55 +0200
parents 5a88923fcbfe
children 41ff10fd062f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
1 ;;; view-process-xemacs.el --- XEmacs specific code for view-process
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
2
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
3 ;; Copyright (C) 1995, 1996 Heiko Muenkel
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
4
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
5 ;; AUthor: Heiko Muenkel
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
6 ;; Keywords: processes
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
7
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
8 ;; This file is part of XEmacs.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
9
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
10 ;; XEmacs is free software; you can redistribute it and/or modify it
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
11 ;; under the terms of the GNU General Public License as published by
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
12 ;; the Free Software Foundation; either version 2, or (at your
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
13 ;; option) any later version.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
14
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
15 ;; XEmacs is distributed in the hope that it will be useful, but
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
16 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
18 ;; General Public License for more details.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
19
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
20 ;; You should have received a copy of the GNU General Public License
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
21 ;; along with XEmacs; see the file COPYING. If not, write to the Free
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
22 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
23 ;; 02111-1307, USA.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
24
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
25 ;;; Synched up with: Emacs 20.1
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
26
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
27 ;;; Commentary:
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
28
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
29 ;; This file contains lisp code, which works only in the XEmacs.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
30
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
31 ;; Installation:
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
32
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
33 ;; Put this file in one of your lisp load directories.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
34 ;;
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
35
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
36 ;;; Code:
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
37
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
38 (provide 'view-process-xemacs)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
39
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
40 ;;; variables
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
41
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
42 (defvar View-process-itimer-name "view-process"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
43 "Name of the view process itimer.")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
44
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
45
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
46 ;;; special keybindings
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
47
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
48 (define-key View-process-mode-map '(button2) 'View-process-mouse-kill)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
49 (define-key View-process-mode-map '(button3) 'View-process-popup-menu)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
50
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
51
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
52 ;;; menus
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
53
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
54 (if (not View-process-pulldown-menu)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
55 (setq
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
56 View-process-pulldown-menu
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
57 '("View-process-pulldown-menu-name"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
58 ["Rename Buffer" View-process-rename-current-output-buffer t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
59 ["Submit Bug Report" View-process-submit-bug-report t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
60 ["Quit" View-process-quit t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
61 ("Options"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
62 ["Truncate Lines"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
63 View-process-toggle-truncate-lines
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
64 :style toggle
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
65 :selected truncate-lines]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
66 ["Motion Help"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
67 View-process-toggle-motion-help
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
68 :style toggle
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
69 :selected View-process-motion-help]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
70 ["Two Windows"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
71 View-process-toggle-display-with-2-windows
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
72 :style toggle
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
73 :selected View-process-display-with-2-windows]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
74 ["Hide Header"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
75 View-process-toggle-hide-header
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
76 :style toggle
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
77 :selected View-process-hide-header
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
78 :active View-process-display-with-2-windows]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
79 ["Digits Send Signals"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
80 View-process-toggle-digit-bindings
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
81 :style toggle
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
82 :selected View-process-digit-bindings-send-signal]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
83 )
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
84 )))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
85
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
86
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
87 (if (not View-process-region-menu)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
88 (setq
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
89 View-process-region-menu
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
90 '("PS Region Menu"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
91 ["View Processes" view-processes nil]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
92 ["New PS" View-process-status nil]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
93 ["Update" View-process-status-update nil]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
94 ("Periodic Output"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
95 ["Start "
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
96 View-process-start-itimer
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
97 :style radio
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
98 :selected (not (get-itimer View-process-itimer-name))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
99 :active nil]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
100 ["Stop"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
101 View-process-delete-itimer
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
102 :style radio
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
103 :selected (get-itimer View-process-itimer-name)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
104 :active nil]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
105 )
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
106 ("Send Signal"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
107 ["SIGHUP"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
108 (View-process-send-signal-to-processes-in-region "SIGHUP") t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
109 ["SIGTERM"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
110 (View-process-send-signal-to-processes-in-region "SIGTERM") t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
111 ["SIGKILL"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
112 (View-process-send-signal-to-processes-in-region "SIGKILL") t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
113 ["SIGSTOP"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
114 (View-process-send-signal-to-processes-in-region "SIGSTOP") t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
115 ["SIGCONT"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
116 (View-process-send-signal-to-processes-in-region "SIGCONT") t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
117 ["SIGQUIT"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
118 (View-process-send-signal-to-processes-in-region "SIGQUIT") t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
119 "----"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
120 ["Any Signal..." View-process-send-signal-to-processes-in-region t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
121 "----"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
122 ["Alter Priority..." View-process-renice-processes-in-region t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
123 )
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
124 ("Mark"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
125 ["Mark" View-process-mark-current-line nil]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
126 ["Mark Childs" View-process-mark-childs-in-current-line nil]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
127 ["Remark Last Marks" View-process-reset-last-marks nil]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
128 "----"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
129 ["Unmark" View-process-unmark-current-line nil]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
130 ["Unmark All" View-process-unmark-all nil]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
131 )
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
132 "----"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
133 ["Sort" View-process-sort-region-by-current-field (looking-at "[^ ]")]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
134 ["Reverse" View-process-reverse-region t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
135 ["Field Filter..."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
136 View-process-filter-region-by-current-field
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
137 (looking-at "[^ ]")]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
138 ["Exlude Field Filter..."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
139 (progn (setq current-prefix-arg '(-1))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
140 (call-interactively
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
141 'View-process-filter-region-by-current-field))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
142 :keys "C-u -1 M-c f"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
143 :active (looking-at "[^ ]")]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
144 ["Line Filter..." View-process-filter-region t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
145 ["Exclude Line Filter..."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
146 (progn (setq current-prefix-arg '(-1))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
147 (call-interactively
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
148 'View-process-filter-region))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
149 :keys "C-u -1 M-c g"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
150 :active t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
151 "----"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
152 ("Help"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
153 ["PID and Command" View-process-show-pid-and-command nil]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
154 ["Field Name" View-process-which-field-name nil]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
155 ["Header Line" View-process-show-header-line nil]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
156 ["Own PID" View-process-display-emacs-pid nil]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
157 )
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
158 )
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
159 )
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
160 )
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
161
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
162 (if (not View-process-marked-menu)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
163 (setq
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
164 View-process-marked-menu
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
165 '("PS Marked Menu"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
166 ["View Processes" view-processes t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
167 ["New PS" View-process-status t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
168 ["Update" View-process-status-update t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
169 ("Periodic Output"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
170 ["Start "
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
171 View-process-start-itimer
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
172 :style radio
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
173 :selected (not (get-itimer View-process-itimer-name))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
174 :active nil]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
175 ["Stop"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
176 View-process-delete-itimer
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
177 :style radio
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
178 :selected (get-itimer View-process-itimer-name)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
179 :active nil]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
180 )
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
181 ("Send Signal"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
182 ["SIGHUP" (View-process-send-signal-to-processes-with-mark "SIGHUP") t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
183 ["SIGTERM"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
184 (View-process-send-signal-to-processes-with-mark "SIGTERM")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
185 t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
186 ["SIGKILL"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
187 (View-process-send-signal-to-processes-with-mark "SIGKILL")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
188 t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
189 ["SIGSTOP"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
190 (View-process-send-signal-to-processes-with-mark "SIGSTOP")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
191 t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
192 ["SIGCONT"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
193 (View-process-send-signal-to-processes-with-mark "SIGCONT")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
194 t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
195 ["SIGQUIT"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
196 (View-process-send-signal-to-processes-with-mark "SIGQUIT")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
197 t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
198 "----"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
199 ["Any Signal..." View-process-send-signal-to-processes-with-mark t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
200 "----"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
201 ["Alter Priority..." View-process-renice-processes-with-mark t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
202 )
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
203 ("Mark"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
204 ["Mark" View-process-mark-current-line t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
205 ["Mark Childs" View-process-mark-childs-in-current-line t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
206 ["Remark Last Marks" View-process-reset-last-marks t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
207 "----"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
208 ["Unmark" View-process-unmark-current-line t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
209 ["Unmark All" View-process-unmark-all t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
210 )
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
211 "----"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
212 ["Sort" View-process-sort-output-by-current-field (looking-at "[^ ]")]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
213 ["Reverse" View-process-reverse-output t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
214 ["Field Filter..."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
215 View-process-filter-output-by-current-field (looking-at "[^ ]")]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
216 ["Exlude Field Filter..."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
217 (progn (setq current-prefix-arg '(-1))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
218 (call-interactively
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
219 'View-process-filter-output-by-current-field))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
220 :keys "C-u -1 F"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
221 :active (looking-at "[^ ]")]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
222 ["Line Filter..." View-process-filter-output t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
223 ["Exclude Line Filter..."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
224 (progn (setq current-prefix-arg '(-1))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
225 (call-interactively
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
226 'View-process-filter-output))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
227 :keys "C-u -1 G"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
228 :active t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
229 "----"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
230 ("Help"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
231 ["PID and Command" View-process-show-pid-and-command t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
232 ["Field Name" View-process-which-field-name (looking-at "[^ ]")]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
233 ["Header Line" View-process-show-header-line t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
234 ["Own PID" View-process-display-emacs-pid t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
235 )
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
236 )
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
237 )
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
238 )
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
239
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
240 (if (not View-process-non-region-menu)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
241 (setq
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
242 View-process-non-region-menu
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
243 '("PS Non Region Menu"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
244 ["View Processes" view-processes t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
245 ["New PS" View-process-status t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
246 ["Update" View-process-status-update t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
247 ("Periodic Output"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
248 ["Start "
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
249 View-process-start-itimer
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
250 :style radio
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
251 :selected (not (get-itimer View-process-itimer-name))]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
252 ["Stop"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
253 View-process-delete-itimer
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
254 :style radio
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
255 :selected (get-itimer View-process-itimer-name)]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
256 )
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
257 ("Send Signal"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
258 ["SIGHUP" (View-process-send-signal-to-process-in-line "SIGHUP") t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
259 ["SIGTERM" (View-process-send-signal-to-process-in-line "SIGTERM") t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
260 ["SIGKILL" (View-process-send-signal-to-process-in-line "SIGKILL") t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
261 ["SIGSTOP" (View-process-send-signal-to-process-in-line "SIGSTOP") t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
262 ["SIGCONT" (View-process-send-signal-to-process-in-line "SIGCONT") t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
263 ["SIGQUIT" (View-process-send-signal-to-process-in-line "SIGQUIT") t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
264 "----"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
265 ["Any Signal..." View-process-send-signal-to-process-in-line t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
266 "----"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
267 ["Alter Priority..." View-process-renice-process-in-line t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
268 )
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
269 ("Mark"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
270 ["Mark" View-process-mark-current-line t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
271 ["Mark Childs" View-process-mark-childs-in-current-line t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
272 ["Remark Last Marks" View-process-reset-last-marks t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
273 "----"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
274 ["Unmark" View-process-unmark-current-line nil]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
275 ["Unmark All" View-process-unmark-all nil]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
276 )
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
277 "----"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
278 ["Sort" View-process-sort-output-by-current-field (looking-at "[^ ]")]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
279 ["Reverse" View-process-reverse-output t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
280 ["Field Filter..."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
281 View-process-filter-output-by-current-field
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
282 (looking-at "[^ ]")]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
283 ["Exlude Field Filter..."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
284 (progn (setq current-prefix-arg '(-1))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
285 (call-interactively
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
286 'View-process-filter-output-by-current-field))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
287 :keys "C-u -1 F"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
288 :active (looking-at "[^ ]")]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
289 ["Line Filter..." View-process-filter-output t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
290 ["Exclude Line Filter..."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
291 (progn (setq current-prefix-arg '(-1))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
292 (call-interactively
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
293 'View-process-filter-output))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
294 :keys "C-u -1 G"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
295 :active t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
296 "----"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
297 ("Help"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
298 ["PID and Command" View-process-show-pid-and-command t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
299 ["Field Name" View-process-which-field-name (looking-at "[^ ]")]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
300 ["Header Line" View-process-show-header-line t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
301 ["Own PID" View-process-display-emacs-pid t]
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
302 )
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
303 )
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
304 )
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
305 )
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
306
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
307 (defun View-process-popup-menu (event)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
308 "Pops up a menu for the `View-process-mode'."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
309 (interactive "e")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
310 (mouse-set-point event)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
311 (popup-menu
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
312 (cond ((View-process-region-active-p) View-process-region-menu)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
313 (View-process-pid-mark-alist View-process-marked-menu)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
314 (t View-process-non-region-menu))))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
315
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
316 (defun View-process-install-pulldown-menu ()
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
317 "Installs a pulldown menu for the `View-process-mode'."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
318 (if (and current-menubar
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
319 (not (assoc View-process-pulldown-menu-name current-menubar)))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
320 (progn
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
321 (set-buffer-menubar (copy-sequence current-menubar))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
322 (add-submenu nil
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
323 (cons View-process-pulldown-menu-name
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
324 (cdr View-process-pulldown-menu)))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
325 (add-submenu (list View-process-pulldown-menu-name)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
326 View-process-region-menu
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
327 "Submit Bug Report")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
328 (add-submenu (list View-process-pulldown-menu-name)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
329 View-process-marked-menu
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
330 "Submit Bug Report")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
331 (add-submenu (list View-process-pulldown-menu-name)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
332 View-process-non-region-menu
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
333 "Submit Bug Report")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
334 )))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
335
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
336
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
337 ;;; mode motion
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
338
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
339 (defun View-process-mode-motion-highlight-line (event)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
340 "For use as the value of `mode-motion-hook' in the `View-process-mode'.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
341 It highlights the line under the mouse and displays help messages during
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
342 mouse motion, if `View-process-motion-help' is non nil."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
343 (if (and (event-point event)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
344 (> (event-point event) View-process-header-end))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
345 (progn
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
346 (mode-motion-highlight-line event)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
347 (if (and View-process-motion-help
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
348 (not View-process-stop-motion-help))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
349 (save-excursion
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
350 (mouse-set-point event)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
351 (View-process-show-pid-and-command-or-field-name)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
352 )))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
353 (message "")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
354 ))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
355
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
356 (defun View-process-install-mode-motion ()
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
357 "Installs the `mode-motion-hook'."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
358 (make-local-variable 'mode-motion-hook)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
359 (setq mode-motion-hook 'View-process-mode-motion-highlight-line))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
360
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
361 (defun View-process-toggle-motion-help (&optional arg)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
362 "Change whether a help message is displayed during mouse motion.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
363 With a positive ARG the variable 'View-process-motion-help' is set
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
364 to t and with a negative ARG it is set to nil."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
365 (interactive "P")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
366 (if arg
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
367 (if (>= (prefix-numeric-value arg) 0)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
368 (setq View-process-motion-help t)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
369 (setq View-process-motion-help nil))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
370 (if View-process-motion-help
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
371 (setq View-process-motion-help nil)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
372 (setq View-process-motion-help t))))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
373
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
374 ; necessary for the Emacs 19
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
375 (defalias 'View-process-insert-and-inherit 'insert)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
376
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
377 ;;; timer functions
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
378
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
379 (defun View-process-start-itimer ()
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
380 "Starts or restarts the itimer for updating the process output."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
381 (interactive)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
382 (if (get-itimer View-process-itimer-name)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
383 (progn
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
384 (set-itimer-value (get-itimer View-process-itimer-name)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
385 View-process-itimer-value)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
386 (set-itimer-restart (get-itimer View-process-itimer-name)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
387 View-process-itimer-value))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
388 (start-itimer View-process-itimer-name
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
389 'View-process-status-itimer-function
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
390 View-process-itimer-value
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
391 View-process-itimer-value)))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
392
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
393 (defun View-process-delete-itimer ()
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
394 "Stops (deletes) the view process itimer."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
395 (interactive)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
396 (if (get-itimer View-process-itimer-name)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
397 (delete-itimer View-process-itimer-name)))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
398
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
399
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
400 ;;; region
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
401
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
402 (defun View-process-region-active-p ()
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
403 "Returns t, if a region is active.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
404 If `zmacs-regions' is nil, then this return always nil."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
405 (if zmacs-regions
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
406 (mark)))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
407
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
408
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
409 ;;; Misc
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
410
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
411 (defun View-process-return-current-command-key-as-string ()
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
412 "Returns the key, which invokes the current command as string."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
413 (events-to-keys (this-command-keys)))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
414
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
415 (defun View-process-redraw ()
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
416 "Dummy function. It does nothing in the XEmacs."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
417 )
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
418
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
419
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
420 ;;; font-lock and colors
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
421
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
422 (defun View-process-install-font-lock ()
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
423 "Installs the `font-lock-mode', if `View-process-use-font-lock' is t."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
424 (if View-process-use-font-lock
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
425 (font-lock-mode 1)))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
426
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
427 (if (not (fboundp 'valid-color-name-p))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
428 (defalias 'valid-color-name-p 'x-valid-color-name-p))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
429
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
430 (defun View-process-search-color-in-color-list (color-list)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
431 "Searches a valid color in the COLOR-LIST."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
432 (cond ((not color-list) nil)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
433 ((listp color-list)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
434 (if (valid-color-name-p (car color-list))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
435 (car color-list)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
436 (View-process-search-color-in-color-list (cdr color-list))))))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
437
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
438 (defun View-process-search-color (color)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
439 "It returns a color, which could be displayed by the window manager.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
440 COLOR is either a string with a color or a list with possible
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
441 colors."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
442 (cond ((not color) nil)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
443 ((stringp color)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
444 (if (valid-color-name-p color) color nil))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
445 ((listp color)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
446 (View-process-search-color-in-color-list color))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
447 (t nil)))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
448
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
449 ;;; missing function window-pixel-edges in XEmacs < 19.12
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
450 ;;; Attention: This emulation is only valid, to test if a value
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
451 ;;; is 0 or not.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
452 (if (not (fboundp 'window-pixel-edges))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
453 (defalias 'window-pixel-edges 'window-edges))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
454
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
455
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
456 ;;; Modeline
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
457
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
458 (if (fboundp 'set-specifier)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
459
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
460 (defun view-process-switch-buffer-modeline (modeline-on)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
461 "Switches the current modeline on, if MODELINE-ON is t.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
462 Otherwise the modeline is switched off."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
463 (set-specifier has-modeline-p (cons (current-buffer) modeline-on)))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
464
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
465
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
466 (defun view-process-switch-buffer-modeline (modeline-on)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
467 "Dummy function.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
468 Sorry, the modeline can't be switched off in this emacs version.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
469 You have to update at least to XEmacs 19.12."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
470 )
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
471
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
472 )
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
473
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
474 ;;; view-process-xemacs.el ends here.