Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!mailrus!cwjcc!tut.cis.ohio-state.edu!phil From: phil@tut.cis.ohio-state.edu (Phil Ritzenthaler) Newsgroups: comp.emacs Subject: Re: startup.el Summary: adding hooks to a term file Message-ID: <30438@tut.cis.ohio-state.edu> Date: 4 Jan 89 14:00:27 GMT References: <2225@imagine.PAWL.RPI.EDU> <35065@think.UUCP> Organization: Advanced Computing Center for the Arts and Design Lines: 58 In article <35065@think.UUCP>, rlk@think.com (Robert Krawitz) writes: > > What you should do is load whatever terminal setup code you wish (you > can crib code from startup.el if you want to load the terminal init > file and overload it with your stuff) and set term-file-prefix to nil. > This will inhibit loading the terminal setup file. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ I REALLY don't think you want to do this! Instead, might I suggest what was done with Suns. In the sun.el file, about 1/2 way through, there are some simple lines: ;;; Since .emacs gets loaded before this file, a hook is supplied ;;; for you to put your own bindings in. (defvar sun-raw-map-hooks nil "List of forms to evaluate after setting sun-raw-map.") (let ((hooks sun-raw-map-hooks)) (while hooks (eval (car hooks)) (setq hooks (cdr hooks)) )) In another file, then, I have: (defvar sun-raw-map-hooks nil . . . ) (setq sun-raw-map-hooks '( (define-key sun-raw-map "208z" 'replace-string) ;; R1 . . . )) Which sets up the hook maps needed to remap the keys to what I want. This hook file is then loaded from the .emacs file. I was originally going to do what was previously mentioned and go in and change the startup.el file, but I thought that 1.) then I would have to remember to change it every time I installed a new version and 2.) it was time I learned how to work ==> WITH <== GNU Emacs and not against it. What troubles me is that these hooks are provided ONLY with the sun terminal file. After working with them, I can't understand why these aren't provided to the user for other defined terminals . . . rms?? Phil Ritzenthaler Advanced Computing Center for the Arts & Design (ACCAD) Systems Manager The Ohio State University UUCP: ...!{pyramid,killer}!grumpy.cgrg.ohio-state.edu!phil ARPA: phil@grumpy.cgrg.ohio-state.edu "Research is the process by which a loose brick is found through pounding one's head against a wall." -- Anonymous