Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!apple!bbn!jr@bbn.com From: jr@bbn.com (John Robinson) Newsgroups: comp.emacs Subject: Re: GNU Emacs and the use of Left Function keys on the SUN Message-ID: <52752@bbn.COM> Date: 28 Feb 90 14:50:09 GMT References: <1451@apctrc.UUCP> <50261@lll-winken.LLNL.GOV> Sender: news@bbn.COM Reply-To: jr@bbn.com (John Robinson) Distribution: usa Organization: BBN Systems and Technologies Corporation, Cambridge MA Lines: 46 In-reply-to: jac@muslix.llnl.gov (James Crotinger) In article <50261@lll-winken.LLNL.GOV>, jac@muslix (James Crotinger) writes: >deven@rpi.edu (Deven T. Corzine) said: >> but to enter the sequence, >> type the opening quote, C-q (or if flow control is a problem, use "M-x >> quoted-insert" if you must) then type the function key itself and the >> closing quote. > > Just tried this. The escape sequence does get inserted into the >file. I then tried to evaluate the command, and emacs complains that >I'm using an invalid prefix key. The problem is that ESC-[ is bound to the function backwards-paragraph already, so it can't be the beginning of a longer sequence at the same time. You have to say: (global-unset-key "\e[") before the global-set-key. If you use sunwindows, I recommend that you use emacstool instead; it encodes the function keys differently and compatibly. If this isn't installed at your site, it should be the file $EMACS/etc/emasctool. (Actually, I recommend you obtain and use the window system named X in preference to any of this). Otherwise, look at the file $EMACS/lisp/term/sun.el; here's the relevant bit: (defvar sun-esc-bracket nil "*If non-nil, rebind ESC [ as prefix for Sun function keys.") Basically, this means that, if you say: (setq sun-esc-bracket t) in your .emacs file, the function keys on the Sun will all be enabled for you (modulo .ttyswrc). (Under emacstool, they are all enabled, and emacs sees sequences starting with C-x *). They dispatch through the keymap sun-raw-map. See sun.el, and $EMACS/etc/SUN-SUPPORT. This ought to be recurrent comp.emacs posting number 1. Maybe it could be the only posting ever in comp.emacs.sun, with an expire: never. :-) -- /jr, nee John Robinson Life did not take over the globe by combat, jr@bbn.com or bbn!jr but by networking -- Lynn Margulis