home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 5 / FreshFish_July-August1994.bin / bbs / util / jade-3.0.lha / Jade / lisp / init.jl < prev    next >
Encoding:
Text File  |  1994-04-19  |  2.2 KB  |  71 lines

  1. ;;;; init.jl -- Standard initialisation script
  2. ;;;  Copyright (C) 1993, 1994 John Harper <jsh@ukc.ac.uk>
  3.  
  4. ;;; This file is part of Jade.
  5.  
  6. ;;; Jade is free software; you can redistribute it and/or modify it
  7. ;;; under the terms of the GNU General Public License as published by
  8. ;;; the Free Software Foundation; either version 2, or (at your option)
  9. ;;; any later version.
  10.  
  11. ;;; Jade is distributed in the hope that it will be useful, but
  12. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. ;;; GNU General Public License for more details.
  15.  
  16. ;;; You should have received a copy of the GNU General Public License
  17. ;;; along with Jade; see the file COPYING.  If not, write to
  18. ;;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20. (title-now "Initialising - wait...")
  21.  
  22. (load "lisp")
  23. (load "loadsyms")
  24. (load "windows")
  25. (load "buffers")
  26. (load "modes")
  27. (load "edit")
  28. (load "prompt")
  29. (load "loadkeys")
  30.  
  31. ;; The init-file hook won't get called for the first file since it was
  32. ;; installed too late, so I call it here.
  33. (eval-hook 'open-file-hook (current-buffer))
  34.  
  35. (load "site-init" t)
  36.  
  37. ;; Now try to interpret the user's startup file
  38. (or
  39.   (load (concat (user-home-directory) ".jaderc") t t)
  40.   (load "default" t))
  41.  
  42. ;; If we're on an Amiga and the variable `amiga-no-menus' isn't set load
  43. ;; some menus.
  44. (when (and (amiga-p) (not (boundp 'amiga-no-menus)))
  45.   (load "loadmenus"))
  46.  
  47. ;; Set up the first window as command shell type thing
  48. (set-buffer-special default-buffer t)
  49. (init-mode default-buffer "lisp-mode")
  50.  
  51. ;; Use all arguments which are left.
  52. (let
  53.     (arg)
  54.   (while (setq arg (car command-line-args))
  55.     (cond
  56.       ((equal "-f" arg)
  57.     (setq command-line-args (cdr command-line-args))
  58.     (funcall (read-from-string (car command-line-args))))
  59.       ((equal "-l" arg)
  60.     (setq command-line-args (cdr command-line-args))
  61.     (load (car command-line-args)))
  62.       ((equal "-q" arg)
  63.     (throw 'quit 0))
  64.       (t
  65.     (set-current-buffer (open-file file))))
  66.     (setq command-line-args (cdr command-line-args))))
  67.  
  68. (title (format-string "Jade %d.%d Copyright 1994 John Harper. "
  69.               (major-version-number)
  70.               (minor-version-number)))
  71.