1993-03-11 09:00:25 +00:00
|
|
|
;;; vt100.el --- define VT100 function key sequences in function-key-map
|
|
|
|
|
2006-12-09 04:06:06 +00:00
|
|
|
;; Copyright (C) 1989, 1993, 2001, 2002, 2003, 2004,
|
2006-02-06 12:31:40 +00:00
|
|
|
;; 2005, 2006 Free Software Foundation, Inc.
|
1996-01-14 09:58:28 +00:00
|
|
|
|
1993-03-11 09:00:25 +00:00
|
|
|
;; Author: FSF
|
|
|
|
;; Keywords: terminals
|
|
|
|
|
1996-01-14 09:58:28 +00:00
|
|
|
;; This file is part of GNU Emacs.
|
|
|
|
|
|
|
|
;; GNU Emacs is free software; you can redistribute it and/or modify
|
|
|
|
;; it under the terms of the GNU General Public License as published by
|
|
|
|
;; the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
;; any later version.
|
|
|
|
|
|
|
|
;; GNU Emacs is distributed in the hope that it will be useful,
|
|
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
;; GNU General Public License for more details.
|
|
|
|
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
|
|
|
;; along with GNU Emacs; see the file COPYING. If not, write to the
|
2005-07-04 16:49:24 +00:00
|
|
|
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
|
|
;; Boston, MA 02110-1301, USA.
|
1993-03-11 09:00:25 +00:00
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
|
|
|
|
;; Uses the Emacs 19 terminal initialization features --- won't work with 18.
|
|
|
|
|
|
|
|
;; Handles all VT100 clones, including the Apollo terminal. Also handles
|
|
|
|
;; the VT200 --- its PF- and arrow- keys are different, but all those
|
|
|
|
;; are really set up by the terminal initialization code, which mines them
|
|
|
|
;; out of termcap. This package is here to define the keypad comma, dash
|
|
|
|
;; and period (which aren't in termcap's repertoire) and the function for
|
|
|
|
;; changing from 80 to 132 columns & vv.
|
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
|
1993-05-30 03:39:06 +00:00
|
|
|
;; Set up function-key-map entries that termcap and terminfo don't know.
|
1993-03-11 09:00:25 +00:00
|
|
|
|
2005-07-27 18:02:08 +00:00
|
|
|
|
|
|
|
(defun terminal-init-vt100 ()
|
|
|
|
"Terminal initialization function for vt100."
|
|
|
|
(load "term/lk201" nil t))
|
2005-08-01 15:47:19 +00:00
|
|
|
|
1991-12-20 08:24:06 +00:00
|
|
|
;;; Controlling the screen width.
|
1999-02-23 22:22:50 +00:00
|
|
|
(defvar vt100-wide-mode (= (frame-width) 132)
|
1991-12-20 08:24:06 +00:00
|
|
|
"t if vt100 is in 132-column mode.")
|
|
|
|
|
|
|
|
(defun vt100-wide-mode (&optional arg)
|
1993-05-29 04:40:38 +00:00
|
|
|
"Toggle 132/80 column mode for vt100s.
|
|
|
|
With positive argument, switch to 132-column mode.
|
|
|
|
With negative argument, switch to 80-column mode."
|
1991-12-20 08:24:06 +00:00
|
|
|
(interactive "P")
|
2003-02-04 13:30:45 +00:00
|
|
|
(setq vt100-wide-mode
|
1991-12-20 08:24:06 +00:00
|
|
|
(if (null arg) (not vt100-wide-mode)
|
|
|
|
(> (prefix-numeric-value arg) 0)))
|
|
|
|
(send-string-to-terminal (if vt100-wide-mode "\e[?3h" "\e[?3l"))
|
1993-05-29 04:40:38 +00:00
|
|
|
(set-frame-width terminal-frame (if vt100-wide-mode 132 80)))
|
1993-03-11 09:00:25 +00:00
|
|
|
|
2003-09-01 15:45:59 +00:00
|
|
|
;;; arch-tag: 9ff41f24-a7c9-4dee-9cf2-fbaa951eb840
|
1993-03-11 09:00:25 +00:00
|
|
|
;;; vt100.el ends here
|