]> code.delx.au - gnu-emacs/blobdiff - lisp/term/wyse50.el
(easy-menu-define-key): Fixed bug with BEFORE
[gnu-emacs] / lisp / term / wyse50.el
index c3a990d9026152355fd51f99314fc72680530a2b..3cb1307bb895f89e084547d68c2878e78ec3ddf3 100644 (file)
@@ -1,33 +1,33 @@
 ;;; wyse50.el --- terminal support code for Wyse 50
 
+;; Copyright (C) 1989, 1993, 1994 Free Software Foundation, Inc.
+
 ;; Author: Daniel Pfieffer <pfieffer@cix.cict.fr> January 1991
 ;;     Jim Blandy <jimb@occs.cs.oberlin.edu>
 ;; Keywords: terminals
 
-;; Copyright (C) 1989 Free Software Foundation, Inc.
-
 ;; 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.  No author or distributor
-;; accepts responsibility to anyone for the consequences of using it
-;; or for whether it serves any particular purpose or works at all,
-;; unless he says so in writing.  Refer to the GNU Emacs General Public
-;; License for full details.
-
-;; Everyone is granted permission to copy, modify and redistribute
-;; GNU Emacs, but only under the conditions described in the
-;; GNU Emacs General Public License.   A copy of this license is
-;; supposed to have been given to you along with GNU Emacs so you
-;; can know your rights and responsibilities.  It should be in a
-;; file named COPYING.  Among other things, the copyright notice
-;; and this notice must be preserved on all copies.
+;; 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
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
 
 ;;; Commentary:
 
 ;; Uses the Emacs 19 terminal initialization features --- won't work with 18.
 ;; Rewritten for Emacs 19 by jimb,  January 1992
-;; Cleaned up for new terminal package cinventions by esr, March 1993
+;; Cleaned up for new terminal package conventions by esr, March 1993
 ;; Should work well for Televideo TVI 925 although it's overkill.
 ;;
 ;; The Wyse50 is ergonomically wonderful, but its escape-sequence design sucks
 
 ;;; Code:
 
-;;; Functions especially for this terminal.
-
-(defun wyse-50-insert-line ()
-  "Insert an empty line."
-  (interactive)
-  (beginning-of-line)
-  (open-line 1))
-
-(defun wyse-50-delete-line ()
-  "Delete all of the current line."
-  (interactive)
-  (beginning-of-line)
-  (kill-line 1))
-
-(defun wyse-50-insert-char ()
-  "Insert a space, even in overwrite mode."
-  (interactive)
-  (insert ? ))
-
-(defun wyse-50-print-buffer ()
-  "Like ``print-buffer'', but verifies before printing.
-The `print' key is easy to hit on a Wyse 50."
-  (interactive)
-  (if (y-or-n-p
-       (concat "Print buffer "
-              (buffer-name) "? "))
-      (print-buffer)))
-
-(defun wyse-50-top-of-window (n)
-  "Move point to the top line of the current window.
-With an argument N, move to the Nth line of the window."
-  (interactive "p")
-  (move-to-window-line (1- n)))
-
-(defun wyse-50-bottom-of-window (n)
-  "Move point to the last line of the current window.
-With an argument N, move to the Nth line from the bottom of the window."
-  (interactive "p")
-  (move-to-window-line (- n)))
-
-(defun wyse-50-toggle-screen-width ()
-  "Alternate between 80 and 132 columns."
-  (interactive)
-  (if (<= (frame-width) 80)
-      (progn
-       (send-string-to-terminal "\e`;")
-       (set-frame-width 131))
-    (send-string-to-terminal "\e`:")
-    (set-frame-width 79)))
-
-\f
-;;; Define the escape sequences for the function keys.
 (define-key function-key-map "\C-a" (make-keymap))
 (mapcar (function (lambda (key-definition)
                    (define-key function-key-map
@@ -195,9 +143,9 @@ M-r M-x move-to-window-line, Funct up-arrow or down-arrow are similar
 ;;; scrolled of the screen.  Suspending (C-z) does not cause this problem.
 ;;; On such terminals, Emacs should sacrifice the first and last character of
 ;;; each mode line, rather than a whole screen column!
-(setq kill-emacs-hook
-      (function (lambda () (interactive)
-                 (send-string-to-terminal
-                  (concat "\ea23R" (1+ (frame-width)) "C\eG0")))))
+(add-hook 'kill-emacs-hook
+         (function (lambda () (interactive)
+                     (send-string-to-terminal
+                      (concat "\ea23R" (1+ (frame-width)) "C\eG0")))))
 
 ;;; wyse50.el ends here