home *** CD-ROM | disk | FTP | other *** search
/ Education Sampler 1992 [NeXTSTEP] / Education_1992_Sampler.iso / NeXT / GnuSource / emacs-15.0.3 / lisp / loadup.el < prev    next >
Lisp/Scheme  |  1990-07-19  |  5KB  |  138 lines

  1. ;Load up standardly loaded Lisp files for Emacs.
  2. ;; This is loaded into a bare Emacs to make a dumpable one.
  3. ;; Copyright (C) 1985, 1986 Free Software Foundation, Inc.
  4.  
  5. ;; This file is part of GNU Emacs.
  6.  
  7. ;; GNU Emacs is distributed in the hope that it will be useful,
  8. ;; but WITHOUT ANY WARRANTY.  No author or distributor
  9. ;; accepts responsibility to anyone for the consequences of using it
  10. ;; or for whether it serves any particular purpose or works at all,
  11. ;; unless he says so in writing.  Refer to the GNU Emacs General Public
  12. ;; License for full details.
  13.  
  14. ;; Everyone is granted permission to copy, modify and redistribute
  15. ;; GNU Emacs, but only under the conditions described in the
  16. ;; GNU Emacs General Public License.   A copy of this license is
  17. ;; supposed to have been given to you along with GNU Emacs so you
  18. ;; can know your rights and responsibilities.  It should be in a
  19. ;; file named COPYING.  Among other things, the copyright notice
  20. ;; and this notice must be preserved on all copies.
  21.  
  22.  
  23. (load "subr")
  24. (garbage-collect)
  25. (load "loaddefs.el")  ;Don't get confused if someone compiled loaddefs by mistake.
  26. (garbage-collect)
  27. (load "simple")
  28. (garbage-collect)
  29. (load "help")
  30. (garbage-collect)
  31. (load "files")
  32. (garbage-collect)
  33. (load "indent")
  34. (load "window")
  35. (load "paths.el")  ;Don't get confused if someone compiled paths by mistake.
  36. (garbage-collect)
  37. (load "startup")
  38. (load "lisp")
  39. (garbage-collect)
  40. (load "page")
  41. (load "register")
  42. (garbage-collect)
  43. (load "paragraphs")
  44. (load "lisp-mode")
  45. (garbage-collect)
  46. (load "text-mode")
  47. (load "fill")
  48. (garbage-collect)
  49. (load "c-mode")
  50. (garbage-collect)
  51. (load "isearch")
  52. (garbage-collect)
  53. (load "replace")
  54. (if (eq system-type 'vax-vms)
  55.     (progn
  56.       (garbage-collect)
  57.       (load "vmsproc")))
  58. (garbage-collect)
  59. (load "abbrev")
  60. (garbage-collect)
  61. (load "buff-menu")
  62. (if (eq system-type 'vax-vms)
  63.     (progn
  64.       (garbage-collect)
  65.       (load "vms-patch")))
  66.  
  67. ;If you want additional libraries to be preloaded and their
  68. ;doc strings kept in the DOC file rather than in core,
  69. ;you may load them with a "site-load.el" file.
  70. ;But you must also cause them to be scanned when the DOC file
  71. ;is generated.  For VMS, you must edit ../etc/makedoc.com.
  72. ;For other systems, you must edit ../src/ymakefile.
  73. (if (load "site-load" t)
  74.     (garbage-collect))
  75.  
  76. (load "version.el")  ;Don't get confused if someone compiled version.el by mistake.
  77.  
  78. ;; Note: all compiled Lisp files loaded above this point
  79. ;; must be among the ones parsed by make-docfile
  80. ;; to construct DOC.  Any that are not processed
  81. ;; for DOC will not have doc strings in the dumped Emacs.
  82.  
  83. (message "Finding pointers to doc strings...")
  84. (if (fboundp 'dump-emacs)
  85.     (let ((name emacs-version))
  86.       (while (string-match "[^-+_.a-zA-Z0-9]+" name)
  87.     (setq name (concat (downcase (substring name 0 (match-beginning 0)))
  88.                "-"
  89.                (substring name (match-end 0)))))
  90.       (copy-file (expand-file-name "../etc/DOC")
  91.          (concat (expand-file-name "../etc/DOC-") name)
  92.          t)
  93.       (Snarf-documentation (concat "DOC-" name)))
  94.     (Snarf-documentation "DOC"))
  95. (message "Finding pointers to doc strings...done")
  96.  
  97. ;Note: You can cause additional libraries to be preloaded
  98. ;by writing a site-init.el that loads them.
  99. ;See also "site-load" above.
  100. (load "site-init" t)
  101. (garbage-collect)
  102.  
  103. (if (or (equal (nth 3 command-line-args) "dump")
  104.     (equal (nth 4 command-line-args) "dump"))
  105.     (if (eq system-type 'vax-vms)
  106.     (progn 
  107.       (message "Dumping data as file temacs.dump")
  108.       (dump-emacs "temacs.dump" "temacs")
  109.       (kill-emacs))
  110.       (let ((name (concat "emacs-" emacs-version)))
  111.     (while (string-match "[^-+_.a-zA-Z0-9]+" name)
  112.       (setq name (concat (downcase (substring name 0 (match-beginning 0)))
  113.                  "-"
  114.                  (substring name (match-end 0)))))
  115.     (message "Dumping under names xemacs and %s" name))
  116.       (condition-case ()
  117.       (delete-file "xemacs")
  118.     (file-error nil))
  119.       (dump-emacs "xemacs" "temacs")
  120.       ;; Recompute NAME now, so that it isn't set when we dump.
  121.       (let ((name (concat "emacs-" emacs-version)))
  122.     (while (string-match "[^-+_.a-zA-Z0-9]+" name)
  123.       (setq name (concat (downcase (substring name 0 (match-beginning 0)))
  124.                  "-"
  125.                  (substring name (match-end 0)))))
  126.     (add-name-to-file "xemacs" name t))
  127.       (kill-emacs)))
  128.  
  129. ;; Avoid error if user loads some more libraries now.
  130. (setq purify-flag nil)
  131.  
  132. ;; For machines with CANNOT_DUMP defined in config.h,
  133. ;; this file must be loaded each time Emacs is run.
  134. ;; So run the startup code now.
  135.  
  136. (or (fboundp 'dump-emacs)
  137.     (eval top-level))
  138.