;;; recoed-require.el ;; Copyright (C) 2000,2001 Kenichi OKADA ;; Author: Kenichi OKADA ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as ;; published by the Free Software Foundation; either version 2, or (at ;; your option) any later version. ;; This program is distributed in the hope that it will be useful, but ;; WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;; General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. ;;; Commentary: ;; 2000/11/17 ;; ;; まず,きれいなXEmacsをつくる ;; cd cvs/xemacs ;; rm site-packages ;; configure は 必ず -pdump をつける ;; make ;; sudo make install ;; ;; きれいなXEmacsで,site-packages を作る ;; xemacs -q -l record-require.el ~/cvs/xemacs/site-packages ~/.emacs ;; or ;; xemacs -q -l record-require.el ;; ;; 起動後 ;; M-x load-file .emacs ;; M-x load-file .emacs-wl ;; (require 'mime-setup) ;; 等 ;; requireされたものを記録する ;; C-x C-f ~/cvs/xemacs/site-packages ;; M-x make-site-packages ;; ;; apel/poe.elc 入れると format-time-string でエラーがでたり… ;; ftp://ftp.opaopa.org/pub/elisp/poe-pdump.dif ;; ;; xemacs.dmp を作り直す ;; make ;; sudo make install ;; ;; 手動でやるには ;; まず,DOCを作る (site-packages に変更がなければ,する必要なし) ;; % cd src ;; % rm ../lib-src/DOC ;; % make ../lib-src/DOC ;; # cp ../lib-src/DOC \ ;; /usr/local/xemacs/lib/xemacs-21.5-b3/mipsel-mg2-linux/ ;; ;; ダンプする ;; %./xemacs -nd -batch -l ../lisp/loadup.el dump ;; # cp xemacs.dmp ${bindir}/xemacs-${version}-`./xemacs -sd`.dmp ;; (cp xemacs.dmp /usr/local/xemacs/bin/xemacs-21.5-b3-3beb6460.dmp) (setq site-load-packages nil) ;(condition-case nil (require 'poe) (error nil)) (fset 'ad:require (symbol-function 'require)) (defun require (feature &optional filename noerror) (let ((feat (if noerror (condition-case nil (ad:require feature filename) (file-error)) (ad:require feature filename)))) (if (and (symbol-name feat) (null (member (concat (symbol-name feat) ".elc") site-load-packages))) (setq site-load-packages (append site-load-packages (list (concat (symbol-name feat) ".elc"))))) feat)) (defun make-site-packages () (interactive) (save-excursion (let ((lo site-load-packages)) (insert "(setq site-load-packages '(") (while (car lo) (insert "\"" (car lo) "\" ") (setq lo (cdr lo))) (insert "))") (insert " (let ((lo site-load-packages)) (while (car lo) (if (null (condition-case nil (require (intern (car lo))) (error nil))) (setq site-load-packages (delete (car lo) site-load-packages))) (setq lo (cdr lo)))) ") ;;; record-require.el ends here