Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!aplcen!uunet!motcid!wallach From: wallach@motcid.UUCP (Cliff H. Wallach) Newsgroups: comp.emacs Subject: Re: Help with redefining function key Message-ID: <4239@avocado5.UUCP> Date: 19 Jul 90 19:53:32 GMT References: <4196@avocado5.UUCP> Organization: Motorola Inc. - Cellular Infrastructure Div., Arlington Heights, IL 60004 Lines: 50 My thanks to everyone who helped me redefine the Sun insert key! The basic problem was caused by some interaction with the term/sun.el file. While only the local sun-gods can edit sun.el, one can add functions into set-term-hook. These functions are executed after sun.el does its thing. Below is my (cleaned up) .emacs file. ;; skip opening screen (setq inhibit-startup-message t) ;; disable a truly annoying feature (setq blink-matching-paren nil) ;; try to save typing (fset 'yes-or-no-p 'y-or-n-p) ;; defines cursor keys, also does ??? (if (equal (getenv "TERM") "sun") (setq sun-esc-bracket t)) ;; disable lisp debug mode (setq debug-on-error nil) ;;; Setup code to execute at end of sun.el (setq term-setup-hook '(lambda () ;; define the INS key (global-set-key "\C-[[247z" 'overwrite-mode) ;; define the DEL key (global-set-key "\C-[[249z" 'delete-char) ;; define the HOME or numeric-7 key (global-set-key "\C-[[214z" 'beginning-of-line) ;; define the END or numeric-1 key (global-set-key "\C-[[220z" 'end-of-line) ;; define HELP and F1 keys (global-set-key "\C-[[207z" 'help-for-help) (global-set-key "\C-[[224z" 'help-for-help) )) Cliff Wallach, searching for the elisp manual ...uunet!motcid!wallach