home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / pcl / docs.lha / latexinfo / elisp / makeinfo.el < prev    next >
Encoding:
Text File  |  1991-11-26  |  900 b   |  31 lines

  1. ;;(if (null (getenv "LATEXINFO"))
  2. ;;  (error "You must define the environment variable LATEXINFO first."))
  3.  
  4. (defun compile-if-necessary (file)
  5.   (let ((filename (expand-file-name file)))
  6.     (cond ((not (file-exists-p filename))
  7.        (error "File not found: %s" filename))
  8.       ((not (file-exists-p (concat filename "c")))
  9.        (byte-compile-file filename))
  10.       ((file-newer-than-file-p filename (concat filename "c"))
  11.        (byte-compile-file filename))
  12.       (t
  13.        (message "%s is up to date." filename)))
  14.     )
  15.   )
  16.  
  17. ;;; LaTeXinfo
  18. (setq load-path 
  19.       (cons (setq latexinfo-formats-directory
  20.           (file-name-as-directory "ELISP"))
  21.         load-path))
  22.  
  23. (load-file  "LATEXINFO/.latexinfo")
  24. (compile-if-necessary "PROGRAM.el")
  25. (load-file "PROGRAM.elc")
  26. (mapcar 'compile-if-necessary (directory-files "ELISP" t ".*.el$"))
  27. (find-file  "MANUAL.tex")
  28. (latexinfo-format-buffer t)
  29. (save-some-buffers t)
  30. (kill-emacs 0)
  31.