;;; ess-debug.el --- debugging start up for ESS12;; Copyright (C) 1997--2001 A.J. Rossini3;; Copyright (C) 2001--2006 A.J. Rossini, Richard M. Heiberger, Martin4;; Maechler, Kurt Hornik, Rodney Sparapani, and Stephen Eglen.56;; Author: A.J. Rossini <[email protected]>7;; Created: November 19978;; Maintainer: ESS-core <[email protected]>910;; Keywords: languages, tools1112;; This file is part of ESS.1314;; This file is free software; you can redistribute it and/or modify15;; it under the terms of the GNU General Public License as published by16;; the Free Software Foundation; either version 2, or (at your option)17;; any later version.1819;; This file is distributed in the hope that it will be useful,20;; but WITHOUT ANY WARRANTY; without even the implied warranty of21;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the22;; GNU General Public License for more details.2324;; You should have received a copy of the GNU General Public License25;; along with GNU Emacs; see the file COPYING. If not, write to26;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.2728;;; Commentary:2930;; Strictly for debugging and development. usage is:31;; xemacs -no-site-file -no-init-file -load ess-debug.el -f S432;; (or similar!)33;;34;; The whole point of this file is to enable debugging from a vanilla35;; environment. It probably isn't needed too much right now.3637;;; Code:3839(defun ess-add-path (path &rest options)40"Add PATH to `load-path' if it exists under `default-load-path'41directories and it does not exist in `load-path'.4243You can use following PATH styles:44load-path relative: \"PATH/\"45(it is searched from `default-load-path')46home directory relative: \"~/PATH/\" \"~USER/PATH/\"47absolute path: \"/HOO/BAR/BAZ/\"4849You can specify following OPTIONS:50'all-paths search from `load-path'51instead of `default-load-path'52'append add PATH to the last of `load-path'.5354For ESS, ONLY use load-path, since Emacs doesn't have55default-load-path."5657(let ((rest load-path)58p)59(if (and (catch 'tag60(while rest61(setq p (expand-file-name path (car rest)))62(if (file-directory-p p)63(throw 'tag p))64(setq rest (cdr rest))))65(not (member p load-path)))66(setq load-path67(if (memq 'append options)68(append load-path (list p))69(cons p load-path))))))7071(setq-default debug-on-error t)72(ess-add-path "~rossini/Repos/repos-svn/ess/lisp")73;; ^^adapt!!!^^^^^^^^^^^^^^^74(require 'ess-site)7576; Local variables section7778;;; This file is automatically placed in Outline minor mode.79;;; The file is structured as follows:80;;; Chapters: ^L ;81;;; Sections: ;;*;;82;;; Subsections: ;;;*;;;83;;; Components: defuns, defvars, defconsts84;;; Random code beginning with a ;;;;* comment85;;; Local variables:86;;; mode: emacs-lisp87;;; mode: outline-minor88;;; outline-regexp: "\^L\\|\\`;\\|;;\\*\\|;;;\\*\\|(def[cvu]\\|(setq\\|;;;;\\*"89;;; End:9091;;; ess-debug.el ends here929394