Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!mit-eddie!amadeus.UUCP!mdb From: mdb@amadeus.UUCP (Mark D. Baushke) Newsgroups: comp.emacs Subject: Re: Gold key Message-ID: <8710100149.AA13838@amadeus.silvlis.com> Date: Fri, 9-Oct-87 21:49:30 EDT Article-I.D.: amadeus.8710100149.AA13838 Posted: Fri Oct 9 21:49:30 1987 Date-Received: Mon, 12-Oct-87 00:44:58 EDT Sender: djd@eddie.MIT.EDU Organization: Silvar-Lisco, 1080 Marsh Road, Menlo Park, CA 94025-1053 Lines: 65 I would guess that you have run into the problem of WHEN emacs executes your ~/.emacs file. It is executed BEFORE the terminal dependent stuff. This means that the terminal dependent stuff is probably getting re-defined after it is set in your .emacs. Folks in the bug-gnu-emacs list have discussed the question of when ~/.emacs should be executed. I think most agreed that executing it first allows for more customization, which is desirable for GNU Emacs users. A simple way to do what you want is to put a line like the following into your ~/.emacs file: (setq term-setup-hook 'edt-emulation-on) or maybe (if (string= (getenv "TERM") "vt100") (setq term-setup-hook 'edt-emulation-on)) depending on what your intent is. This hook is run (see $EMACS/lisp/startup.el) after the terminal dependent code is run. The hook allows for customization to be applied after the default setup was performed. An alternative, is to define the vt100.el (or whatever terminal setup you are interested in providing) into a sub-directory called "term" contained in a directory which may contain your own versions of lisp files (say "emacs-lisp") which you add to the load-path emacs variable. In order to get emacs to use your private directory, you could add the following to your ~/.emacs : (if (not (let ((found nil) (t-list load-path) (my-load-path (expand-file-name "~/emacs-lisp"))) (while (and (not found) t-list) (if (equal (car t-list) my-load-path) (setq found t-list)) (setq t-list (cdr t-list))) found)) (setq load-path (cons my-load-path load-path))) or if you don't care that you might already have "~/emacs-lisp" in your load path, just adding the next line is good enough (setq load-path (cons my-load-path load-path)) This bit of lisp adds the directory "emacs-lisp" located in your home directory to the search path used by emacs. Including where it will look for "term/vt100.el". Using this method, you may provide a private customization for any terminal type you wish. Emacs will always search your directory first before looking into the default load-path (usually $EMACS/lisp). You can even use this to over-ride the definitions of standard functions like shell, by providing your own copy of the lisp file which emacs uses during autoload. Either way works. It is a matter of choice. Note: Having your own copies of vt100.el may give you more work to keep up with any changes made at your site to the originals. Mark Baushke UUCP: ...!sun!silvlis!mdb