*** empty log message ***
[ess.git] / lisp / ess-debug.el
blob6892726cd92e74aa48e55b522c7e6ef006f57cd5
1 ;;; ess-debug.el --- debugging start up for ESS
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.
7 ;; Original Author: A.J. Rossini <rossini@biostat.washington.edu>
8 ;; Created: November 1997
9 ;; Maintainers: ESS-core <ESS-core@stat.math.ethz.ch>
11 ;; Keywords: start up, configuration.
13 ;; This file is part of ESS.
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.
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.
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.
29 ;;; Commentary:
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!)
35 ;;; Code:
38 ;;; For Tony's environment
39 ;(require 'tex-site)
40 ;(require 'x-symbol-hooks)
41 ;(x-symbol-initialize)
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'.
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/\"
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'.
59 For ESS, ONLY use load-path, since Emacs doesn't have
60 default-load-path."
62 (let ((rest load-path)
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))))))
76 (setq-default debug-on-error t)
77 (ess-add-path "~rossini/sandbox/Src/Emacs/ESS/ess/lisp")
78 (require 'ess-site)
80 \f; Local variables section
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:
95 ;;; ess-debug.el ends here