project.lsp Version 1.00 31 October 2004 Author Steven Jones Contact jones57@swbell.net include the word "nyquist" in subject line The contents of this file are released under the terms of the GNU General Public License. See the file LICENSE.txt A project is a set of files in a specific directory. By default the parent directory for all projects is contained in *proj-dir*. The intent of projects is to keep files related to specific compositions group together and separate from general Nyquist files.
var
Location of the project directory
function
(pload [name]) Set name as the current project and load it's bootstrap file. The bootstrap file should have the same name as the project. For example if *project-dir* contains /home/sj/proj and the projects name is "foo", then a folder by the name foo should exist under proj. Within foo the bootstrap file should have the name foo.lsp /home/sj/proj/foo/foo.lsp name - string. The project name. If specified, name is marked as the "current" project. If no name is specified the current project is reloaded.
function
(prl) Reload the current project
function
(pfload filename) Load a file from the current project directory. filename - string. The file name relative to the current project directory.
;; project.lsp ;; Version 1.00 31 October 2004 ;; Author Steven Jones ;; ;; Contact jones57@swbell.net include the word "nyquist" in subject line ;; ;; The contents of this file are released under the terms of the GNU General ;; Public License. See the file LICENSE.txt ;; ;; A project is a set of files in a specific directory. By default the parent ;; directory for all projects is contained in *proj-dir*. ;; ;; The intent of projects is to keep files related to specific compositions ;; group together and separate from general Nyquist files. ;; (require 'os) (provide 'project) (current-file "project") ;; @doc var *project-dir* ;; Location of the project directory ;; (setq *project-dir* "./proj") ;; Change to fit local environment. (setq *project-name* nil) ;; Load the current project. See pload function below ;; (defun project:load () (let (filename) (setf filename (os:join *project-dir* *project-name* *project-name*)) (gc-reset) (gc) (format t "~%*************************************************************~%") (format t "Loading project ~s~%" filename) (errload filename))) ;; @doc function pload ;; (pload [name]) ;; Set name as the current project and load it's bootstrap file. ;; ;; The bootstrap file should have the same name as the project. For example if ;; *project-dir* contains /home/sj/proj and the projects name is "foo", then a ;; folder by the name foo should exist under proj. Within foo the bootstrap ;; file should have the name foo.lsp /home/sj/proj/foo/foo.lsp ;; ;; name - string. The project name. If specified, name is marked as the ;; "current" project. If no name is specified the current project ;; is reloaded. ;; (defun pload (&optional name) (if name (setq *project-name* name)) (project:load)) ;; @doc function prl ;; (prl) ;; Reload the current project ;; (setfn prl pload) ;; @doc function pfload ;; (pfload filename) ;; Load a file from the current project directory. ;; ;; filename - string. The file name relative to the current project directory. ;; (defun pfload (filename) (let (fqn) (setq fqn (os:join *project-dir* *project-name* filename)) (errload fqn)))