home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.006 / xemacs-1 / lib / xemacs-19.13 / lisp / prim / device.el < prev    next >
Encoding:
Text File  |  1995-08-04  |  2.0 KB  |  48 lines

  1. ;;; extents.el --- miscellaneous device functions not written in C
  2.  
  3. ;;;; Copyright (C) 1994, 1995 Board of Trustees, University of Illinois
  4. ;;;; Copyright (C) 1995 Ben Wing
  5.  
  6. ;; Keywords: internal
  7.  
  8. ;; This file is part of XEmacs.
  9.  
  10. ;; XEmacs is free software; you can redistribute it and/or modify it
  11. ;; under the terms of the GNU General Public License as published by
  12. ;; the Free Software Foundation; either version 2, or (at your option)
  13. ;; any later version.
  14.  
  15. ;; XEmacs is distributed in the hope that it will be useful, but
  16. ;; WITHOUT ANY WARRANTY; without even the implied warranty of
  17. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  18. ;; General Public License for more details.
  19.  
  20. ;; You should have received a copy of the GNU General Public License
  21. ;; along with XEmacs; see the file COPYING.  If not, write to the Free
  22. ;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  23.  
  24. (defun quit-char (&optional device)
  25.   "Return the character that causes a QUIT to happen.
  26. This is normally C-g.  Optional arg DEVICE specifies the device
  27. that the information is returned for; nil means the current device."
  28.   (nth 3 (current-input-mode device)))
  29.  
  30. (defun make-tty-device (&optional tty terminal-type)
  31.   "Create a new device on TTY.
  32.   TTY should be the name of a tty device file (e.g. \"/dev/ttyp3\" under
  33. SunOS et al.), as returned by the `tty' command.  A value of nil means
  34. use the stdin and stdout as passed to XEmacs from the shell.
  35.   If TERMINAL-TYPE is non-nil, it should be a string specifying the
  36. type of the terminal attached to the specified tty.  If it is nil,
  37. the terminal type will be inferred from the TERM environment variable."
  38.   (make-device 'tty (list (cons 'tty tty)
  39.               (cons 'terminal-type terminal-type))))
  40.  
  41. (defun make-x-device (&optional display argv-list)
  42.   "Create a new device connected to DISPLAY.
  43. Optional argument ARGV-LIST is a list of strings describing command line
  44. options."
  45.   (make-device 'x (list (cons 'display display)
  46.             (cons 'argv-list argv-list))))
  47.  
  48.