0
|
1 ;;; dgnushack.el --- a hack to set the load path for byte-compiling
|
16
|
2 ;; Copyright (C) 1994,95,96,97 Free Software Foundation, Inc.
|
0
|
3
|
|
4 ;; Author: Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
|
|
5 ;; Version: 4.19
|
|
6 ;; Keywords: news, path
|
|
7
|
|
8 ;; This file is part of GNU Emacs.
|
|
9
|
|
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)
|
|
13 ;; any later version.
|
|
14
|
|
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.
|
|
19
|
|
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.
|
|
24
|
|
25 ;;; Commentary:
|
|
26
|
|
27 ;;; Code:
|
|
28
|
16
|
29 (fset 'facep 'ignore)
|
|
30
|
0
|
31 (require 'cl)
|
16
|
32 (require 'bytecomp)
|
|
33 (push "." load-path)
|
|
34 (require 'lpath)
|
0
|
35
|
2
|
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)
|
16
|
41 (defalias 'define-mail-user-agent 'ignore)
|
|
42
|
|
43 (eval-and-compile
|
|
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)))
|
2
|
49
|
0
|
50 (defun dgnushack-compile ()
|
16
|
51 ;;(setq byte-compile-dynamic t)
|
0
|
52 (let ((files (directory-files "." nil ".el$"))
|
|
53 (xemacs (string-match "XEmacs" emacs-version))
|
16
|
54 ;;(byte-compile-generate-call-tree t)
|
|
55 byte-compile-warnings file elc)
|
|
56 (condition-case ()
|
|
57 (require 'w3-forms)
|
|
58 (error (setq files (delete "nnweb.el" files))))
|
|
59 (while (setq file (pop files))
|
0
|
60 (cond
|
|
61 ((or (string= file "custom.el") (string= file "browse-url.el"))
|
|
62 (setq byte-compile-warnings nil))
|
|
63 (xemacs
|
|
64 (setq byte-compile-warnings
|
|
65 '(free-vars unresolved callargs redefine)))
|
|
66 (t
|
|
67 (setq byte-compile-warnings
|
|
68 '(free-vars unresolved callargs redefine obsolete))))
|
|
69 (when (or (not (member file '("gnus-xmas.el" "gnus-picon.el"
|
|
70 "messagexmas.el" "nnheaderxm.el"
|
|
71 "smiley.el")))
|
|
72 xemacs)
|
16
|
73 (when (or (not (file-exists-p (setq elc (concat file "c"))))
|
|
74 (file-newer-than-file-p file elc))
|
|
75 (ignore-errors
|
|
76 (byte-compile-file file)))))))
|
0
|
77
|
|
78 (defun dgnushack-recompile ()
|
|
79 (require 'gnus)
|
|
80 (byte-recompile-directory "." 0))
|
|
81
|
|
82 ;;; dgnushack.el ends here
|
|
83
|