Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
2701 views
1
;;; ess-debug.el --- debugging start up for ESS
2
3
;; Copyright (C) 1997--2001 A.J. Rossini
4
;; Copyright (C) 2001--2006 A.J. Rossini, Richard M. Heiberger, Martin
5
;; Maechler, Kurt Hornik, Rodney Sparapani, and Stephen Eglen.
6
7
;; Author: A.J. Rossini <[email protected]>
8
;; Created: November 1997
9
;; Maintainer: ESS-core <[email protected]>
10
11
;; Keywords: languages, tools
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
;; The whole point of this file is to enable debugging from a vanilla
36
;; environment. It probably isn't needed too much right now.
37
38
;;; Code:
39
40
(defun ess-add-path (path &rest options)
41
"Add PATH to `load-path' if it exists under `default-load-path'
42
directories and it does not exist in `load-path'.
43
44
You can use following PATH styles:
45
load-path relative: \"PATH/\"
46
(it is searched from `default-load-path')
47
home directory relative: \"~/PATH/\" \"~USER/PATH/\"
48
absolute path: \"/HOO/BAR/BAZ/\"
49
50
You can specify following OPTIONS:
51
'all-paths search from `load-path'
52
instead of `default-load-path'
53
'append add PATH to the last of `load-path'.
54
55
For ESS, ONLY use load-path, since Emacs doesn't have
56
default-load-path."
57
58
(let ((rest load-path)
59
p)
60
(if (and (catch 'tag
61
(while rest
62
(setq p (expand-file-name path (car rest)))
63
(if (file-directory-p p)
64
(throw 'tag p))
65
(setq rest (cdr rest))))
66
(not (member p load-path)))
67
(setq load-path
68
(if (memq 'append options)
69
(append load-path (list p))
70
(cons p load-path))))))
71
72
(setq-default debug-on-error t)
73
(ess-add-path "~rossini/Repos/repos-svn/ess/lisp")
74
;; ^^adapt!!!^^^^^^^^^^^^^^^
75
(require 'ess-site)
76
77
; Local variables section
78
79
;;; This file is automatically placed in Outline minor mode.
80
;;; The file is structured as follows:
81
;;; Chapters: ^L ;
82
;;; Sections: ;;*;;
83
;;; Subsections: ;;;*;;;
84
;;; Components: defuns, defvars, defconsts
85
;;; Random code beginning with a ;;;;* comment
86
;;; Local variables:
87
;;; mode: emacs-lisp
88
;;; mode: outline-minor
89
;;; outline-regexp: "\^L\\|\\`;\\|;;\\*\\|;;;\\*\\|(def[cvu]\\|(setq\\|;;;;\\*"
90
;;; End:
91
92
;;; ess-debug.el ends here
93
94