1 ;;; dgnushack.el --- a hack to set the load path for byte-compiling
2 ;; Copyright (C) 1994,95,96,97,98 Free Software Foundation, Inc.
4 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
6 ;; Keywords: news, path
8 ;; This file is part of GNU Emacs.
10 ;; GNU Emacs is free software; you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option)
15 ;; GNU Emacs is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 ;; Boston, MA 02111-1307, USA.
33 (push "~/lisp/custom" load-path)
35 (load "./lpath.el" nil t)
37 (defalias 'device-sound-enabled-p 'ignore)
38 (defalias 'play-sound-file 'ignore)
39 (defalias 'nndb-request-article 'ignore)
40 (defalias 'efs-re-read-dir 'ignore)
41 (defalias 'ange-ftp-re-read-dir 'ignore)
42 (defalias 'define-mail-user-agent 'ignore)
45 (unless (string-match "XEmacs" emacs-version)
46 (fset 'get-popup-menu-response 'ignore)
47 (fset 'event-object 'ignore)
48 (fset 'x-defined-colors 'ignore)
49 (fset 'read-color 'ignore)))
51 (defun dgnushack-compile (&optional warn)
52 ;;(setq byte-compile-dynamic t)
54 (setq byte-compile-warnings
55 '(free-vars unresolved callargs redefine)))
56 (unless (locate-library "cus-edit")
57 (error "You do not seem to have Custom installed.
58 Fetch it from <URL:http://www.dina.kvl.dk/~abraham/custom/>.
59 You also then need to add the following to the lisp/dgnushack.el file:
61 (push \"~/lisp/custom\" load-path)
63 Modify to suit your needs."))
64 (let ((files (directory-files "." nil "^[^=].*\\.el$"))
65 (xemacs (string-match "XEmacs" emacs-version))
66 ;;(byte-compile-generate-call-tree t)
70 (error (setq files (delete "nnweb.el" (delete "nnlistserv.el" files)))))
73 (error (setq files (delete "gnus-bbdb.el" files))))
74 (while (setq file (pop files))
75 (when (or (and (not xemacs)
76 (not (member file '("gnus-xmas.el" "gnus-picon.el"
77 "messagexmas.el" "nnheaderxm.el"
78 "smiley.el" "x-overlay.el"))))
80 (not (member file '("md5.el")))))
81 (when (or (not (file-exists-p (setq elc (concat file "c"))))
82 (file-newer-than-file-p file elc))
84 (byte-compile-file file)))))))
86 (defun dgnushack-recompile ()
88 (byte-recompile-directory "." 0))
90 ;;; dgnushack.el ends here