annotate lisp/prim/console.el @ 149:538048ae2ab8 r20-3b1

Import from CVS: tag r20-3b1
author cvs
date Mon, 13 Aug 2007 09:36:16 +0200
parents 360340f9fd5f
children 8eaf7971accc
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 ;;; console.el --- miscellaneous console functions not written in C
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2
149
538048ae2ab8 Import from CVS: tag r20-3b1
cvs
parents: 108
diff changeset
3 ;; Copyright (C) 1994, 1995 Board of Trustees, University of Illinois
538048ae2ab8 Import from CVS: tag r20-3b1
cvs
parents: 108
diff changeset
4 ;; Copyright (C) 1995, 1996 Ben Wing
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6 ;; Keywords: internal
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 ;; This file is part of XEmacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 ;; XEmacs is free software; you can redistribute it and/or modify it
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 ;; under the terms of the GNU General Public License as published by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 ;; the Free Software Foundation; either version 2, or (at your option)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 ;; any later version.
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 is distributed in the hope that it will be useful, but
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 ;; General Public License for more details.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 ;; You should have received a copy of the GNU General Public License
16
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 0
diff changeset
21 ;; along with XEmacs; see the file COPYING. If not, write to the
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 30
diff changeset
22 ;; Free Software Foundation, 59 Temple Place - Suite 330,
16
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 0
diff changeset
23 ;; Boston, MA 02111-1307, USA.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 ;;; Synched up with: Not in FSF.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26
149
538048ae2ab8 Import from CVS: tag r20-3b1
cvs
parents: 108
diff changeset
27 ;;; Commentary:
538048ae2ab8 Import from CVS: tag r20-3b1
cvs
parents: 108
diff changeset
28
538048ae2ab8 Import from CVS: tag r20-3b1
cvs
parents: 108
diff changeset
29 ;;; Code:
538048ae2ab8 Import from CVS: tag r20-3b1
cvs
parents: 108
diff changeset
30
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 (defun quit-char (&optional console)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 "Return the character that causes a QUIT to happen.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 This is normally C-g. Optional arg CONSOLE specifies the console
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 that the information is returned for; nil means the current console."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 (nth 3 (current-input-mode console)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36
108
360340f9fd5f Import from CVS: tag r20-1b6
cvs
parents: 70
diff changeset
37 (defun resume-pid-console (pid)
360340f9fd5f Import from CVS: tag r20-1b6
cvs
parents: 70
diff changeset
38 "Resume the consoles with a controlling process of PID."
360340f9fd5f Import from CVS: tag r20-1b6
cvs
parents: 70
diff changeset
39 (mapc (lambda (c)
360340f9fd5f Import from CVS: tag r20-1b6
cvs
parents: 70
diff changeset
40 (if (and (eq (console-type c) 'tty)
149
538048ae2ab8 Import from CVS: tag r20-3b1
cvs
parents: 108
diff changeset
41 (eq pid (console-tty-controlling-process c)))
108
360340f9fd5f Import from CVS: tag r20-1b6
cvs
parents: 70
diff changeset
42 (resume-console c)))
360340f9fd5f Import from CVS: tag r20-1b6
cvs
parents: 70
diff changeset
43 (console-list))
360340f9fd5f Import from CVS: tag r20-1b6
cvs
parents: 70
diff changeset
44 ; documentation for mapc lies!
360340f9fd5f Import from CVS: tag r20-1b6
cvs
parents: 70
diff changeset
45 nil)
149
538048ae2ab8 Import from CVS: tag r20-3b1
cvs
parents: 108
diff changeset
46
538048ae2ab8 Import from CVS: tag r20-3b1
cvs
parents: 108
diff changeset
47 ;;; console.el ends here