wallach@motcid.UUCP (Cliff H. Wallach) (07/19/90)
I am using GNU Emacs 18.55 on a Sun-3/80, SunOS 4.0.3. When I put the following lines in my .emacs file, I get an error message. setting debug-on-error doesn't help. ;; define the INS key to toggle insert/overwrite mode ;; where esc [ 2 4 7 z is generated by the INS key (global-set-key "\C-[[247z" 'overwrite-mode) This works when typed into the *scratch* buffer. It also works when I put this into a seperate file, and manually type "M-X load-file fkeys.elc". Cliff Wallach ...uunet!motcid!wallach
wallach@motcid.UUCP (Cliff H. Wallach) (07/20/90)
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