~ubuntu-branches/ubuntu/edgy/ess/edgy

« back to all changes in this revision

Viewing changes to lisp/ess-debug.el

  • Committer: Bazaar Package Importer
  • Author(s): Camm Maguire
  • Date: 2002-03-04 14:26:19 UTC
  • Revision ID: james.westby@ubuntu.com-20020304142619-udvspp3pjys7tapf
Tags: upstream-5.1.20
ImportĀ upstreamĀ versionĀ 5.1.20

Show diffs side-by-side

added added

removed removed

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