annotate lisp/gnus/dgnushack.el @ 0:376386a54a3c r19-14

Import from CVS: tag r19-14
author cvs
date Mon, 13 Aug 2007 08:45:50 +0200
parents
children ac2d302a0011
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 ;;; dgnushack.el --- a hack to set the load path for byte-compiling
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2 ;; Copyright (C) 1994,95,96 Free Software Foundation, Inc.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4 ;; Author: Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 ;; Version: 4.19
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6 ;; Keywords: news, path
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 ;; This file is part of GNU Emacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 ;; GNU Emacs is free software; you can redistribute it and/or modify
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 ;; it under the terms of the GNU General Public License as published by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 ;; the Free Software Foundation; either version 2, or (at your option)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 ;; any later version.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 ;; GNU Emacs is distributed in the hope that it will be useful,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 ;; GNU General Public License for more details.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 ;; You should have received a copy of the GNU General Public License
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 ;; Boston, MA 02111-1307, USA.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 ;;; Commentary:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 ;;; Code:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 (require 'cl)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 (setq load-path (cons "." load-path))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 (setq custom-file "/THIS FILE DOES NOT eXiST!")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 (defun dgnushack-compile ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 ;(setq byte-compile-dynamic t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 (let ((files (directory-files "." nil ".el$"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 (xemacs (string-match "XEmacs" emacs-version))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 byte-compile-warnings file)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 (while files
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 (setq file (car files)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 files (cdr files))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 (cond
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 ((or (string= file "custom.el") (string= file "browse-url.el"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 (setq byte-compile-warnings nil))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 (xemacs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 (setq byte-compile-warnings
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 '(free-vars unresolved callargs redefine)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 (t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 (setq byte-compile-warnings
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 '(free-vars unresolved callargs redefine obsolete))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 (when (or (not (member file '("gnus-xmas.el" "gnus-picon.el"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 "messagexmas.el" "nnheaderxm.el"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 "smiley.el")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 xemacs)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55 (condition-case ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 (byte-compile-file file)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57 (error nil))))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 (defun dgnushack-recompile ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 (require 'gnus)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61 (byte-recompile-directory "." 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 ;;; dgnushack.el ends here
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64