From: amos@sol.acs.unt.edu (Amos A. Gouaux)
Subject: SUMMARY: load-path modification during build
Organization: University of North Texas
Date: Tue, 29 Sep 1992 15:31:23 GMT

a while back, i asked what folks thought would be the best way to modify
the load-path during build time.  i got several responses, along with
inquires as to what i eventually did.  the solution that i finally settled
down to may not be the best, but i certainly haven't had any problems with
it.  in all, i'm very pleased how it worked out.  i like having the local-info
and local-lisp directories.  i'm sure it will save a great deal of hassle
when the next release of emacs comes out.

amos


-------------------------------------------------------------------------------
here's the emacs lib directory (/usr/local/gnu/lib/emacs):

total 16
drwxr-sr-x  8 root          512 Aug 31 13:44 ./
drwxr-sr-x  6 root          512 Aug  6 21:07 ../
drwxr-sr-x  2 root         2048 Sep  1 08:54 etc/
drwxr-sr-x  2 root         2048 Feb 16  1992 info/
drwxr-sr-x  3 root         6144 Sep  1 09:23 lisp/
drwxr-sr-x  2 root         2048 Aug 31 20:10 local-info/
drwxr-sr-x  3 amos          512 Sep 10 10:36 local-lisp/
drwxrwsrwx  2 root          512 Sep 11 16:02 lock/

i followed the instructions specified for using "make".  then i edited
the "site-init.el" file located within the emacs source directory:

;;;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;;; "site-init.el"
;;;
;;; used when building emacs to create certain default definitions.
;;;
;;; define default manual-formatted-dirlist.  these are the directories that
;;; are definitely known to exist and that will not change.  new or specialized
;;; man sections will be added to this list in "default.el".  that way, emacs
;;; will not have to be built everytime the man tree changes.

(setq manual-formatted-dirlist
      '("/usr/share/lman/cat1" 
        "/usr/share/lman/cat2" 
        "/usr/share/lman/cat3" 
        "/usr/share/lman/cat4" 
        "/usr/share/lman/cat5" 
        "/usr/share/lman/cat6"
        "/usr/share/lman/cat7" 
        "/usr/share/lman/cat8"
        "/usr/share/lman/catl"
        "/usr/share/lman/catn"
        "/usr/share/man/cat1" 
        "/usr/share/man/cat2" 
        "/usr/share/man/cat3"
        "/usr/share/man/cat4" 
        "/usr/share/man/cat5" 
        "/usr/share/man/cat6"
        "/usr/share/man/cat7" 
        "/usr/share/man/cat8"))

;;; load path modification to include local stuff.  
;;; kludge to deal with dump weirdness!

(setq load-path 
      (if (string= (car load-path) "../lisp")
          (cdr load-path)
        load-path))

;;; now setup the local load-path.

(setq load-path 
      (cons (expand-file-name "../local-lisp" exec-directory) 
            load-path))

;;; now do the same thing with the info utility.

(setq Info-directory-list
      (list (expand-file-name "../local-info" exec-directory) 
            Info-directory))

;;;____________________________________________________________________________

notice the hack to compensate for the "../lisp" business.  imho, this
should not be necessary what so ever.  unfortunately, it is.  at any
rate, i then got dave gillespie's "info.el" from csvax.cs.caltech.edu
and stuck it into the "local-lisp" directory above.  then, i simply
entered "make install" at the command line.

i created the file "localdir" within "local-info" for listing the
locally added, compressed info files.  notice that "localdir" can not
be compressed.  in terms of local lisp code, the obvious place for
that is in "local-lisp".  this includes the "default.el" file, which,
for the sake of being thorough, follows:

;;;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;;; File: "default.el"
;;;
;;;____________________________________________________________________________
;;;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;;; modify default manual-formatted-dirlist to include the specialized man
;;; sections that we have created.  this has been put here because these
;;; directories may change and/or new ones are likely to be added in between
;;; emacs version builds.

(setq manual-formatted-dirlist
      (append
       (list
        "/usr/share/lman/cat1elm" 
        "/usr/share/lman/cat1mm" 
        "/usr/share/lman/cat1nn" 
        "/usr/share/lman/cat1tek" 
        "/usr/share/lman/cat1tk"
        "/usr/share/lman/cat3d"
        "/usr/share/lman/cat3nsr"
        "/usr/share/lman/cat3tcl"
        "/usr/share/lman/cat3tk"
        "/usr/share/lman/cat5nsr" 
        "/usr/share/lman/cat8nn"
        "/usr/share/lman/cat8nsr")
       manual-formatted-dirlist))

;;;____________________________________________________________________________
;;;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;;; create default term-setup-hook just in case user hasn't already done so.
;;; if term-setup-hook has not been defined, this simple version is provided
;;; to ensure that at least the arrow keys will work.

(or term-setup-hook
    (setq term-setup-hook
          (function
           (lambda ()
             (and (fboundp 'enable-arrow-keys)
                  (eq 'backward-paragraph (lookup-key esc-map "["))
                  (enable-arrow-keys))))))

;;;____________________________________________________________________________
;;;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;;; ***testing***  offers new users (no ~/.emacs present) a globally offered
;;; sample init file.

(require 'new-user)

;;;____________________________________________________________________________
;;;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;;; have to do something about C-s and C-q for those not using xterms.
;;; routine comes from kevin gallagher (kgallagh@digi.lonestar.org).

(require 'flow-ctrl)

;;;___________________________________________________________________________
-- 
amos@unt.edu                   Amos A. Gouaux                   (817) 565-4161
-= Academic Computing Services, University of North Texas, Denton, TX, USA. =-