remove trailing whitespaces

git-svn-id: https://supercollider.svn.sourceforge.net/svnroot/supercollider/trunk@9417 a380766d-ff14-0410-b294-a243070f3f08
This commit is contained in:
Tim Blechmann 2009-09-26 06:17:48 +00:00
parent 4bff94c0cc
commit d1639c1cbb
11 changed files with 108 additions and 108 deletions

View file

@ -563,7 +563,7 @@ Either visit file internally (.sc) or start external editor (.rtf)."
)
)
; (if buffer
;
;
; )
)
)

View file

@ -180,7 +180,7 @@ If EOB-P is non-nil, positions cursor at end of buffer."
:group 'sclang-options
:version "21.3"
:type 'boolean)
(defcustom sclang-main-stop nil
"*Call Main.stop on shutdown."
:group 'sclang-options
@ -659,7 +659,7 @@ if PRINT-P is non-nil. Return STRING if successful, otherwise nil."
(setq default-directory sclang-runtime-directory))))
(switch-to-buffer buffer)))
(add-hook 'sclang-library-startup-hook
(add-hook 'sclang-library-startup-hook
(lambda () (and sclang-show-workspace-on-startup
(sclang-switch-to-workspace))))

View file

@ -96,7 +96,7 @@ The expressions are joined as alternatives with the \\| operator."
(concat "^\\s *\\*?\\(" sclang-method-name-regexp "\\)\\s *{")
"Regular expression matching method definitions.")
(defconst sclang-block-regexp
(defconst sclang-block-regexp
"^\\((\\)\\s *\\(?:/[/*]?.*\\)?"
"Regular expression matching the beginning of a code block.

View file

@ -5,7 +5,7 @@
(easy-mmode-define-minor-mode sclang-minor-mode
"Toggle sclang-minor-mode.
With no argument, this command toggles the mode.
With no argument, this command toggles the mode.
Non-null prefix argument turns on the mode.
Null prefix argument turns off the mode.
@ -18,7 +18,7 @@ sclang code with the normal command C-c C-c and C-c C-d."
;; The minor mode bindings.
'(("\C-c\C-c" . sclang-eval-region-or-line)
("\C-c\C-d" . sclang-eval-region)
("\C-\M-x" . sclang-eval-defun)
("\C-\M-x" . sclang-eval-defun)
("\C-c\C-h" . sclang-find-help)
("\C-\M-h" . sclang-goto-help-browser)
("\C-c\C-s" . sclang-main-stop)
@ -29,7 +29,7 @@ sclang code with the normal command C-c C-c and C-c C-d."
(easy-mmode-define-minor-mode sclang-help-minor-mode
"Toggle sclang-minor-mode.
With no argument, this command toggles the mode.
With no argument, this command toggles the mode.
Non-null prefix argument turns on the mode.
Null prefix argument turns off the mode.

View file

@ -152,7 +152,7 @@
;; font-lock support
;; =====================================================================
(defvar sclang-font-lock-keyword-list
(defvar sclang-font-lock-keyword-list
'(
"arg"
"classvar"
@ -494,7 +494,7 @@ Returns the column to indent to."
(defun sclang-make-document ()
(sclang-perform-command-no-result 'documentNew sclang-document-id)
(sclang-document-update-properties t))
(defun sclang-close-document (buffer)
(with-sclang-document
buffer

View file

@ -17,12 +17,12 @@
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to
;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Commentary:
;;
;;
;;; Code:

View file

@ -46,7 +46,7 @@ EmacsInterface {
dt = {
result = IdentitySet.new;
Class.allClasses.do { | class |
if (class.isMetaClass.not) {
result.add(class.name);
@ -55,7 +55,7 @@ EmacsInterface {
result.add(method.name);
};
};
File.use(fileName, "w", { | file |
result.collectAs(_.asString, Array).storeLispOn(file);
});
@ -83,7 +83,7 @@ EmacsInterface {
})
.put(\classDefinitions, { | name |
var result, class, files;
result = SortedList(8, this.makeSubListSorter(0, '<'));
if ((class = name.asSymbol.asClass).notNil) {
@ -105,12 +105,12 @@ EmacsInterface {
}
}
};
name -> result
})
.put(\methodDefinitions, { | name |
var result, symbol, getter, setter;
result = SortedList(8, this.makeSubListSorter(0, '<'));
symbol = name.asSymbol;
@ -125,7 +125,7 @@ EmacsInterface {
}
}
};
name -> result
})
.put(\methodReferences, { | name |
@ -167,7 +167,7 @@ EmacsInterface {
args = method.argNames.copyToEnd(1);
varArgs = method.varArgs;
lastIndex = args.lastIndex;
args.do({ | name, i |
var default;
if (varArgs and: { i == lastIndex }) {

View file

@ -231,7 +231,7 @@ EmacsButton : EmacsWidget {
[\let, [[\widget, [\cdr, [\find, id, 'sclang-widgets', ':key', [\quote, \car]]]],
[\states, [\quote, states]]],
['widget-put', \widget, ':states', \states],
['widget-value-set', \widget, [\nth, value, \states]]]
['widget-value-set', \widget, [\nth, value, \states]]]
).asLispString) */
}
initStates {|argStates|states=argStates}

View file

@ -108,7 +108,7 @@ EmacsDocument
}
background_ {arg color, rangestart= -1, rangesize = 0;
}
}
stringColor_ {arg color, rangeStart = -1, rangeSize = 0;
}
@ -116,15 +116,15 @@ EmacsDocument
front {
Emacs.sendToLisp(\_documentSwitchTo, this);
}
unfocusedFront {
Emacs.sendToLisp(\_documentPopTo, this);
}
syntaxColorize {
Emacs.sendToLisp(\_documentSyntaxColorize, this);
}
selectRange { arg start=0, length=0;
//_TextWindow_SelectRange
}
@ -150,7 +150,7 @@ EmacsDocument
string_{|string, rangestart = -1, rangesize = 1|
Emacs.sendToLisp(\_documentPutString, [this, string]);
}
currentLine { |returnFunc|
Emacs.evalLispExpression(['sclang-line-at-point'].asLispString, { |result| returnFunc.value( result ) } );
// ['with-current-buffer', title, ['thing-at-point', '\'line'] ].asLispString, { |result| returnFunc.value( result ) } )
@ -168,7 +168,7 @@ EmacsDocument
Emacs.evalLispExpression(['with-current-buffer', title, ['current-word'] ].asLispString, { |result| returnFunc.value( result ) } )
^nil;
}
// environment support
/* envir_ { | environment |
envir = environment;
@ -184,15 +184,15 @@ EmacsDocument
};
current = this;
}
didResignKey {
if (envir === currentEnvironment) {
envir.pop;
};
if ( current === this, { current = nil } );
//super.didResignKey;
}
}
// PRIVATE
*prNewFromPath { | argPath, selectionStart, selectionLength, completionFunc |
@ -207,7 +207,7 @@ EmacsDocument
this.documentDo(id, completionFunc);
}
});
}
}
*prNewFromString { | name, str, makeListener, completionFunc |
Emacs.sendToLisp(
\_documentNew,
@ -249,8 +249,8 @@ EmacsDocument
prSetTitle { | argTitle |
title = argTitle;
}
prGetFileName {
^path
}
@ -260,7 +260,7 @@ EmacsDocument
path = Document.standardizePath(path);
}
}
prSetIsListener { | flag |
isListener = flag.notNil;
}
@ -285,14 +285,14 @@ EmacsDocument
selectedText {
^""
}
rangeText { arg rangestart=0, rangesize=1;
rangeText { arg rangestart=0, rangesize=1;
^""
}
prinsertText { arg dataptr, txt;
}
insertTextRange { arg string, rangestart, rangesize;
}
setBackgroundColor { }
setBackgroundColor { }
selectedRangeLocation {
^0
}
@ -308,7 +308,7 @@ EmacsDocument
}
prinitByIndex {
^this.shouldNotImplement(thisMethod)
}
}
initLast {
^this.shouldNotImplement(thisMethod)
}

View file

@ -65,25 +65,25 @@ ScelDocument : Document{
}
string_ { | argName, rangestart = -1, rangesize = 1 |
if ( thisdoc.notNil, {
if ( thisdoc.notNil, {
thisdoc.string_( argName, rangestart, rangesize )
},{
cFuncs = cFuncs ++ { this.string_( argName ) };
},{
cFuncs = cFuncs ++ { this.string_( argName ) };
});
}
title_ { | argName, completFunc |
if ( thisdoc.notNil, {
if ( thisdoc.notNil, {
thisdoc.title_( argName, completFunc )
},{
cFuncs = cFuncs ++ { this.title_( argName, completFunc ) };
},{
cFuncs = cFuncs ++ { this.title_( argName, completFunc ) };
});
}
title{
if ( thisdoc.notNil, {
^thisdoc.title;
},{
},{
^("***"++title_p++"***")
});
}
@ -97,7 +97,7 @@ ScelDocument : Document{
prGetFileName {
if ( thisdoc.notNil, {
^thisdoc.path;
},{
},{
^path_p;
});
}
@ -106,7 +106,7 @@ ScelDocument : Document{
if ( thisdoc.notNil, {
thisdoc.prSetFileName( argPath );
},{
cFuncs = cFuncs ++ { this.prSetFileName( argPath ) };
cFuncs = cFuncs ++ { this.prSetFileName( argPath ) };
});
}
@ -122,42 +122,42 @@ ScelDocument : Document{
// ^this
}
front {
if ( thisdoc.notNil, {
front {
if ( thisdoc.notNil, {
thisdoc.front
},{
cFuncs = cFuncs ++ { this.front };
},{
cFuncs = cFuncs ++ { this.front };
});
}
unfocusedFront {
if ( thisdoc.notNil, {
unfocusedFront {
if ( thisdoc.notNil, {
thisdoc.unfocusedFront;
},{
cFuncs = cFuncs ++ { this.unfocusedFront };
cFuncs = cFuncs ++ { this.unfocusedFront };
});
}
syntaxColorize {
if ( thisdoc.notNil, {
syntaxColorize {
if ( thisdoc.notNil, {
thisdoc.syntaxColorize;
},{
cFuncs = cFuncs ++ { this.syntaxColorize };
cFuncs = cFuncs ++ { this.syntaxColorize };
});
}
prisEditable_{ | flag = true |
if ( thisdoc.notNil, {
prisEditable_{ | flag = true |
if ( thisdoc.notNil, {
thisdoc.prisEditable_( flag );
},{
cFuncs = cFuncs ++ { this.prisEditable_( flag ) };
});
editable = flag;
}
removeUndo{
if ( thisdoc.notNil, {
removeUndo{
if ( thisdoc.notNil, {
thisdoc.removeUndo
},{
cFuncs = cFuncs ++ { this.removeUndo };
cFuncs = cFuncs ++ { this.removeUndo };
});
}
@ -194,29 +194,29 @@ ScelDocument : Document{
// dataptr = nil;
}
isEdited {
isEdited {
if ( thisdoc.notNil, {
^thisdoc.isEdited
},{
^false;
^false;
});
}
// isFront { thisdoc.isFront }
editable_{arg abool=true; this.prisEditable_( abool ) }
/* should maybe be this:
path{
path{
if ( thisdoc.notNil, {
^^thisdoc.prGetFileName;
},{
},{
^path_p;
});
*/
path{^thisdoc.prGetFileName }
*addToList{ |doc|
var key, sceld;
*addToList{ |doc|
var key, sceld;
// "adding to List".postln;
key = allDocuments.detectIndex( { |it| it.thisdoc === doc } );
if ( key.isNil,
@ -234,13 +234,13 @@ ScelDocument : Document{
allDocuments.removeAt(toremove);
});
}
prclose {
prclose {
if ( thisdoc.notNil,{
thisdoc.prclose
},{
cFuncs = cFuncs ++ { this.prclose };
});
cFuncs = cFuncs ++ { this.prclose };
});
}
string {arg rangestart, rangesize = 1;
@ -291,14 +291,14 @@ ScelDocument : Document{
text {
^this.string;
}
rangeText { arg rangestart=0, rangesize=1;
rangeText { arg rangestart=0, rangesize=1;
^this.string( rangestart, rangesize );
}
// not implemented:
selectRange { arg start=0, length=0; }
background_ {arg color, rangestart= -1, rangesize = 0;
}
}
stringColor_ {arg color, rangeStart = -1, rangeSize = 0;
}
@ -313,7 +313,7 @@ ScelDocument : Document{
}
insertTextRange { arg string, rangestart, rangesize;
}
setBackgroundColor { }
setBackgroundColor { }
selectedRangeLocation {
^0
}
@ -325,7 +325,7 @@ ScelDocument : Document{
bounds_{
}
*current {
var cur = EmacsDocument.current;
if ( cur.isNil ){
@ -333,7 +333,7 @@ ScelDocument : Document{
}{
^cur.sceld;
}
}
}
*prGetIndexOfListener{
^this.allDocuments.detectIndex( { |doc| doc.title == "*SCLang:PostBuffer*" } );
@ -345,7 +345,7 @@ ScelDocument : Document{
}
prinitByIndex {
^this.shouldNotImplement(thisMethod)
}
}
initLast {
^this.shouldNotImplement(thisMethod)
}

View file

@ -9,16 +9,16 @@
var recorder, scoper;
var countsViews, ctlr;
var dumping=false, startDump, stopDump, stillRunning;
if (emacsbuf.notNil, { ^emacsbuf.front });
if(w.isNil,{
w = emacsbuf = EmacsBuffer("*" ++ name.asString ++ " server*");
});
if(isLocal,{
booter = EmacsButton(w, ["Boot","Quit"]);
booter.action = { arg value;
booter.action = { arg value;
if(value == 1, {
booting.value;
this.boot;
@ -28,14 +28,14 @@
});
};
booter.value=serverRunning.binaryValue;
killer = EmacsButton(w, ["K"], { Server.killAll });
killer.enabled = false;
});
active = EmacsText(w, this.name.asString, 12, \center);
// active.background = Color.black;
if(serverRunning,running,stopped);
if(serverRunning,running,stopped);
makeDefault = EmacsButton(w, ["-> default"], {
thisProcess.interpreter.s = this;
@ -43,7 +43,7 @@
});
w.newline;
recorder = EmacsButton(w, ["prepare rec","record >","stop []"], {
if (recorder.value == 1) {
this.prepareForRecord;
@ -51,16 +51,16 @@
if (recorder.value == 2) { this.record } { this.stopRecording };
};
});
recorder.enabled = false;
stillRunning = {
SystemClock.sched(0.2, { this.stopAliveThread });
};
w.defineKey("n", { this.queryAllNodes })
.defineKey(" ", { if(serverRunning.not) { this.boot } })
.defineKey("d", {
startDump = {
startDump = {
this.dumpOSC(1);
this.stopAliveThread;
dumping = true;
@ -74,7 +74,7 @@
};
if(dumping, stopDump, startDump)
});
if (isLocal, {
running = {
// active.stringColor_(Color.red);
@ -93,12 +93,12 @@
// active.stringColor_(Color.yellow(0.9));
//booter.setProperty(\value,0);
};
w.onClose = {
emacsbuf = nil;
ctlr.remove;
};
},{
},{
running = {
// active.background = Color.red;
recorder.enabled = true;
@ -117,18 +117,18 @@
};
});
if(serverRunning,running,stopped);
w.newline;
countsViews =
countsViews =
#[
"Avg CPU: ", "Peak CPU: ",
"Avg CPU: ", "Peak CPU: ",
"UGens: ", "Synths: ", "Groups: ", "SynthDefs: "
].collect({ arg name, i;
var label,numView, pctView;
label = EmacsText(w, name, 12, \right);
if (i < 2, {
if (i < 2, {
numView = EmacsText(w, "?", 5, \right);
pctView = EmacsText(w, "%");
},{
@ -137,7 +137,7 @@
if (i == 1) { w.newline };
numView
});
ctlr = SimpleController(this)
.put(\serverRunning, { if(serverRunning,running,stopped) })
.put(\counts,{
@ -150,7 +150,7 @@
})
.put(\cmdPeriod,{
recorder.value=0;
});
});
w.gotoBob;
w.front;
this.startAliveThread;
@ -166,18 +166,18 @@
var getSliderValues;
s = Server.default;
usefulControls = controls.select {|controlName, i|
var ctlname;
ctlname = controlName.name;
(ctlname != "?") && (ctlname != "gate")
};
numControls = usefulControls.size;
sliders = Array.newClear(numControls);
id = s.nextNodeID; // generate a note id.
// make the window
w = EmacsBuffer("*SynthDesc"+name++"*");
// add a button to start and stop the sound.
@ -196,7 +196,7 @@
msgFunc.valueEnvir
};
};
startButton.action = {|value|
if (value == 1) {
// start sound
@ -211,22 +211,22 @@
};
};
};
// create controls for all parameters
usefulControls.do {|controlName, i|
var ctlname, ctlname2, capname, spec;
ctlname = controlName.name;
capname = ctlname.copy;
capname = ctlname.copy;
capname[0] = capname[0].toUpper;
spec = ctlname.asSymbol.asSpec;
sliders[i] = EmacsNumber(w, capname, spec?ControlSpec(-1e8,1e8),
{|ez| s.sendMsg("/n_set", id, ctlname, ez); }, controlName.defaultValue);
};
// set start button to zero upon a cmd-period
cmdPeriodFunc = { startButton.value = 0; };
CmdPeriod.add(cmdPeriodFunc);
// stop the sound when window closes and remove cmdPeriodFunc.
w.onClose = {
s.sendMsg("/n_free", id);