1 ;;; dgnushack.el --- a hack to set the load path for byte-compiling
2 ;; Copyright (C) 1994,95,96,97,98,99 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.
34 (load "./lpath.el" nil t)
36 (defalias 'device-sound-enabled-p 'ignore)
37 (defalias 'play-sound-file 'ignore)
38 (defalias 'nndb-request-article 'ignore)
39 (defalias 'efs-re-read-dir 'ignore)
40 (defalias 'ange-ftp-re-read-dir 'ignore)
41 (defalias 'define-mail-user-agent 'ignore)
44 (unless (string-match "XEmacs" emacs-version)
45 (fset 'get-popup-menu-response 'ignore)
46 (fset 'event-object 'ignore)
47 (fset 'x-defined-colors 'ignore)
48 (fset 'read-color 'ignore)))
50 (defun dgnushack-compile (&optional warn)
51 ;;(setq byte-compile-dynamic t)
53 (setq byte-compile-warnings
54 '(free-vars unresolved callargs redefine)))
55 (unless (locate-library "cus-edit")
56 (error "You do not seem to have Custom installed.
57 Fetch it from <URL:http://www.dina.kvl.dk/~abraham/custom/>.
58 You also then need to add the following to the lisp/dgnushack.el file:
60 (push \"~/lisp/custom\" load-path)
62 Modify to suit your needs."))
63 (let ((files (directory-files "." nil "^[^=].*\\.el$"))
64 (xemacs (string-match "XEmacs" emacs-version))
65 ;;(byte-compile-generate-call-tree t)
69 (error (setq files (delete "nnweb.el" (delete "nnlistserv.el" files)))))
70 (while (setq file (pop files))
71 (when (or (and (not xemacs)
72 (not (member file '("gnus-xmas.el" "gnus-picon.el"
73 "messagexmas.el" "nnheaderxm.el"
74 "smiley.el" "x-overlay.el"))))
76 (not (member file '("md5.el")))))
77 (when (or (not (file-exists-p (setq elc (concat file "c"))))
78 (file-newer-than-file-p file elc))
80 (byte-compile-file file)))))))
82 (defun dgnushack-recompile ()
84 (byte-recompile-directory "." 0))
86 ;;; dgnushack.el ends here