Mercurial > hg > xemacs
view device-type-hacking.el @ 66:c343c57a93e8
fix user-mail-address pblm
author | Henry S Thompson <ht@inf.ed.ac.uk> |
---|---|
date | Mon, 16 Dec 2024 18:22:27 +0000 |
parents | 0d4e2fbdb6aa |
children |
line wrap: on
line source
(defconst device-type-hacking-id "$Id: device-type-hacking.el,v 1.1 1996/07/25 22:17:36 rjc Exp $") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; ;; Changes some values depending on device type ttys. have ;; ;; control-h being delete and zmacs-regions turned off. ;; ;; ;; ;; Since select-frame-hook doesn't seem to be called for tty ;; ;; devices, we have to cheat and set the tty defaults whenever a ;; ;; frame is deselected. ;; ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defvar zmacs-regions-specifier (make-specifier-and-init 'boolean '( (global ((tty). nil) ((x) . t)) ) )) (defun device-type-tty-selected () (define-key global-map '(control h) 'backward-delete-char-untabify) ) (defun device-type-x-selected () (define-key global-map '(control h) 'help) ) (defun device-type-select-frame-hook () (setq zmacs-regions (specifier-instance zmacs-regions-specifier) ) (if (equal (device-type (selected-device)) "tty") (device-type-tty-selected) (device-type-x-selected) ) ) (defun device-type-deselect-frame-hook () (setq zmacs-regions (not (specifier-instance zmacs-regions-specifier)) ) (device-type-tty-selected) ) (setq deselect-frame-hook '(default-deselect-frame-hook)) (setq select-frame-hook '(default-select-frame-hook)) (add-hook 'select-frame-hook (function device-type-select-frame-hook)) (add-hook 'deselect-frame-hook (function device-type-deselect-frame-hook) t)