Path: utzoo!mnetor!uunet!husc6!cmcl2!nrl-cmf!ames!ucsd!sdcsvax!ucsdhub!hp-sdd!hplabs!hp-pcd!hpcvca!charles From: charles@hpcvca.HP.COM (Charles Brown) Newsgroups: comp.emacs Subject: Re: Is there a hook for gnu emacs starting up? Message-ID: <640003@hpcvca.HP.COM> Date: 14 Mar 88 18:08:03 GMT References: <640001@hpcvca.HP.COM> Organization: Hewlett-Packard Co., Corvallis, Oregon Lines: 36 > >Is there a hook for gnu emacs starting up? I would like to have the > >appropriate term/???.elc loaded depending upon $TERM. It is easy to > >do this in the .emacs file, but that requires N x M files (N users > >and M computers). Ideally I would like to do: > > if .emacs exists > > load .emacs > > else > > if $TERM == foo > > load "term/foo" > > ... > Put into your .emacs the following > ;;;If non-nil, Emacs startup does > ;;; (load (concat term-file-prefix (getenv "TERM"))) > ;;; You may set this variable to nil in your `.emacs' file if you do not wish > ;;; the terminal-initialization file to be loaded. > (setq term-file-prefix "~/term.") This is precisely what I was trying to avoid. I maintain the emacs sources on several machines. I do not have access to all of the users .emacs file (nor do I want it). > Options/settings that go into a .emacs file should be global for ALL > editing sessions across ALL terminal types. Terminal dependent > options/settings belong in terminal dependent files as in ~/term.xyz or > ~/term.abc. Where abc and xyz are terminal types. This does not mean anything to me. The reason I have the conditional in my psuedo code at the top is because HP terminals and pseudo-terminals have a bewildering array of identifiers, yet they all use the same term/hp.el file. Fortunately a couple of people have sent me a solution which fits what I need. A file named default.el will be loaded at startup time. This is 'documented' in the source of startup.el. :-( Anyway, this works well. :-) charles@hp-pcd