Initial Commit
[packages] / xemacs-packages / ess / lisp / ess-debug.el
1 ;;; ess-debug.el --- debugging start up for ESS
2
3 ;; Copyright (C) 1997--2001 A.J. Rossini
4 ;; Copyright (C) 2001--2004 A.J. Rossini, Rich M. Heiberger, Martin
5 ;;      Maechler, Kurt Hornik, Rodney Sparapani, and Stephen Eglen.
6
7 ;; Original Author: A.J. Rossini <rossini@biostat.washington.edu>
8 ;; Created: November 1997
9 ;; Maintainers: ESS-core <ESS-core@stat.math.ethz.ch>
10
11 ;; Keywords: start up, configuration.
12
13 ;; This file is part of ESS.
14
15 ;; This file is free software; you can redistribute it and/or modify
16 ;; it under the terms of the GNU General Public License as published by
17 ;; the Free Software Foundation; either version 2, or (at your option)
18 ;; any later version.
19
20 ;; This file is distributed in the hope that it will be useful,
21 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23 ;; GNU General Public License for more details.
24
25 ;; You should have received a copy of the GNU General Public License
26 ;; along with GNU Emacs; see the file COPYING.  If not, write to
27 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
28
29 ;;; Commentary:  
30
31 ;; Strictly for debugging and development.  usage is:
32 ;;           xemacs -no-site-file -no-init-file -load ess-debug.el -f S4    
33 ;; (or similar!)
34
35 ;;; Code:
36
37
38 ;;; For Tony's environment
39 ;(require 'tex-site)
40 ;(require 'x-symbol-hooks)
41 ;(x-symbol-initialize)
42
43
44 (defun ess-add-path (path &rest options)
45   "Add PATH to `load-path' if it exists under `default-load-path'
46 directories and it does not exist in `load-path'.
47
48 You can use following PATH styles:
49         load-path relative: \"PATH/\"
50                         (it is searched from `default-load-path')
51         home directory relative: \"~/PATH/\" \"~USER/PATH/\"
52         absolute path: \"/HOO/BAR/BAZ/\"
53
54 You can specify following OPTIONS:
55         'all-paths      search from `load-path'
56                         instead of `default-load-path'
57         'append         add PATH to the last of `load-path'.
58
59 For ESS, ONLY use load-path, since Emacs doesn't have
60 default-load-path."
61
62   (let ((rest load-path)
63         p)
64     (if (and (catch 'tag
65                (while rest
66                  (setq p (expand-file-name path (car rest)))
67                  (if (file-directory-p p)
68                      (throw 'tag p))
69                  (setq rest (cdr rest))))
70              (not (member p load-path)))
71         (setq load-path
72               (if (memq 'append options)
73                   (append load-path (list p))
74                 (cons p load-path))))))
75
76 (setq-default debug-on-error t)
77 (ess-add-path "~rossini/sandbox/Src/Emacs/ESS/ess/lisp")
78 (require 'ess-site)
79
80 \f; Local variables section
81
82 ;;; This file is automatically placed in Outline minor mode.
83 ;;; The file is structured as follows:
84 ;;; Chapters:     ^L ;
85 ;;; Sections:    ;;*;;
86 ;;; Subsections: ;;;*;;;
87 ;;; Components:  defuns, defvars, defconsts
88 ;;;              Random code beginning with a ;;;;* comment
89 ;;; Local variables:
90 ;;; mode: emacs-lisp
91 ;;; mode: outline-minor
92 ;;; outline-regexp: "\^L\\|\\`;\\|;;\\*\\|;;;\\*\\|(def[cvu]\\|(setq\\|;;;;\\*"
93 ;;; End:
94
95 ;;; ess-debug.el ends here
96