Path: utzoo!mnetor!uunet!husc6!bbn!rochester!ritcv!cci632!dch From: dch@cci632.UUCP (David C. Howland) Newsgroups: comp.emacs Subject: Re: Is there a hook for gnu emacs starting up? Message-ID: <4833@cci632.UUCP> Date: 11 Mar 88 14:44:02 GMT References: <640001@hpcvca.HP.COM> Reply-To: dch@ccird3.UUCP (David C. Howland) Organization: CCI, Communications Systems Division, Rochester, NY Lines: 25 In article <640001@hpcvca.HP.COM> charles@hpcvca.HP.COM (Charles Brown) writes: >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.") 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.