[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New file template

From: Ben Abbott
Subject: Re: New file template
Date: Fri, 01 Jul 2011 20:50:16 -0400

On Jul 1, 2011, at 3:39 PM, Daryl Lee wrote:

> Now that I've configured Octave to launch my preferred editor, I see that 
> when I say "edit newfile.m" it creates a very complete initial template, 
> ready for me to fill in all the gaps.  Is there a way for me to modify that 
> template according to my own needs?  Or maybe choose "on the fly" among 
> several?  For instance, I may do some work for open source projects, some 
> with my employer's copyright, and some with a client's copyright.  Am I 
> limited to just starting with the existing template and editing the newly 
> created file as needed?

Take a look at what "help edit" describes.

Regarding the license portion ...

>    `license'
>          `gpl'
>                GNU General Public License (default).
>          `bsd'
>                BSD-style license without advertising clause.
>          `pd'
>                Public domain.
>          `"text"'
>                Your own default copyright and license.
>           Unless you specify `pd', edit will prepend the copyright
>           statement with "Copyright (C) yyyy Function Author".

So you should be able to place your own license text in place of the GPL 
license (the default).

        edit ("license", "## place your license terms here")

After that when you create a new m-file you should see license at the top.

To change the copyright to another individual or entity ..

        edit ("author", "new.copyright.holder")


reply via email to

[Prev in Thread] Current Thread [Next in Thread]