2020-05-02 22:50:14 +02:00
|
|
|
;;; vt100.el --- define VT100 function key sequences in function-key-map -*- lexical-binding:t -*-
|
1993-03-11 09:00:25 +00:00
|
|
|
|
2022-01-01 02:45:51 -05:00
|
|
|
;; Copyright (C) 1989, 1993, 2001-2022 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.
|
|
|
|
|
2008-05-06 04:34:22 +00:00
|
|
|
;; GNU Emacs is free software: you can redistribute it and/or modify
|
1996-01-14 09:58:28 +00:00
|
|
|
;; it under the terms of the GNU General Public License as published by
|
2008-05-06 04:34:22 +00:00
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
;; (at your option) any later version.
|
1996-01-14 09:58:28 +00:00
|
|
|
|
|
|
|
;; 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
|
2017-09-13 15:52:52 -07:00
|
|
|
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
1993-03-11 09:00:25 +00:00
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
|
|
|
|
;; 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."
|
2006-05-20 17:02:47 +00:00
|
|
|
(tty-run-terminal-initialization (selected-frame) "lk201"))
|
1993-03-11 09:00:25 +00:00
|
|
|
|
1991-12-20 08:24:06 +00:00
|
|
|
;;; Controlling the screen width.
|
2010-05-02 22:29:46 -04:00
|
|
|
(define-minor-mode vt100-wide-mode
|
2018-07-01 23:34:53 -04:00
|
|
|
"Toggle 132/80 column mode for vt100s."
|
2010-07-22 13:09:52 +02:00
|
|
|
:global t :init-value (= (frame-width) 132)
|
2013-05-15 19:55:41 -04:00
|
|
|
:group 'terminals
|
2010-05-02 22:29:46 -04:00
|
|
|
(send-string-to-terminal (if vt100-wide-mode "\e[?3h" "\e[?3l"))
|
|
|
|
(set-frame-width terminal-frame (if vt100-wide-mode 132 80)))
|
1993-03-11 09:00:25 +00:00
|
|
|
|
Provide 'term/name in lisp/term files.
* lisp/term/AT386.el, lisp/term/bobcat.el, lisp/term/cygwin.el:
* lisp/term/internal.el, lisp/term/iris-ansi.el, lisp/term/linux.el:
* lisp/term/lk201.el, lisp/term/news.el, lisp/term/ns-win.el:
* lisp/term/pc-win.el, lisp/term/rxvt.el, lisp/term/screen.el:
* lisp/term/sun.el, lisp/term/tty-colors.el, lisp/term/tvi970.el:
* lisp/term/vt100.el, lisp/term/vt200.el, lisp/term/w32-win.el:
* lisp/term/w32console.el, lisp/term/wyse50.el, lisp/term/x-win.el:
For consistency, provide 'term/name in all files that don't already.
2016-02-15 21:59:40 -08:00
|
|
|
(provide 'term/vt100)
|
|
|
|
|
1993-03-11 09:00:25 +00:00
|
|
|
;;; vt100.el ends here
|