added another shortcut for the sclang-complete-symbol (the old one conflicts with some windowmanagers) and added an entry for the function to the menu

git-svn-id: https://supercollider.svn.sourceforge.net/svnroot/supercollider/trunk@8453 a380766d-ff14-0410-b294-a243070f3f08
This commit is contained in:
Marije Baalman 2009-01-08 06:18:51 +00:00
parent fd5746882d
commit 90806c7ab3
3 changed files with 29 additions and 11 deletions

View file

@ -90,6 +90,7 @@
["Find References ..." sclang-find-references] ["Find References ..." sclang-find-references]
["Pop Mark" sclang-pop-definition-mark] ["Pop Mark" sclang-pop-definition-mark]
["Show Method Arguments" sclang-show-method-args] ["Show Method Arguments" sclang-show-method-args]
["Complete keyword" sclang-complete-symbol]
["Dump Interface" sclang-dump-interface] ["Dump Interface" sclang-dump-interface]
"-" "-"
["Index Help Topics" sclang-index-help-topics] ["Index Help Topics" sclang-index-help-topics]
@ -115,6 +116,7 @@
(define-key map "\C-\M-x" 'sclang-eval-defun) (define-key map "\C-\M-x" 'sclang-eval-defun)
(define-key map "\C-c\C-e" 'sclang-eval-expression) (define-key map "\C-c\C-e" 'sclang-eval-expression)
;; language information ;; language information
(define-key map "\C-c\C-n" 'sclang-complete-symbol)
(define-key map "\M-\t" 'sclang-complete-symbol) (define-key map "\M-\t" 'sclang-complete-symbol)
(define-key map "\C-c:" 'sclang-find-definitions) (define-key map "\C-c:" 'sclang-find-definitions)
(define-key map "\C-c;" 'sclang-find-references) (define-key map "\C-c;" 'sclang-find-references)

View file

@ -147,13 +147,21 @@ EmacsDocument
^nil; ^nil;
} }
string_{|string| string_{|string, rangestart = -1, rangesize = 1|
Emacs.sendToLisp(\_documentPutString, [this, string]); Emacs.sendToLisp(\_documentPutString, [this, string]);
} }
/* currentLine { currentLine { |returnFunc|
^"" Emacs.evalLispExpression(['with-current-buffer', title, ['thing-at-point', '\'line'] ].asLispString, { |result| returnFunc.value( result ) } )
}*/ ^nil;
// '(set-text-properties start end nil)' will remove text properties somehow?
}
currentWord { |returnFunc|
Emacs.evalLispExpression(['with-current-buffer', title, ['current-word'] ].asLispString, { |result| returnFunc.value( result ) } )
^nil;
}
// environment support // environment support
/* envir_ { | environment | /* envir_ { | environment |

View file

@ -64,11 +64,11 @@ ScelDocument : Document{
^this ^this
} }
string_ { | argName, completFunc | string_ { | argName, rangestart = -1, rangesize = 1 |
if ( thisdoc.notNil, { if ( thisdoc.notNil, {
thisdoc.string_( argName, completFunc ) thisdoc.string_( argName, rangestart, rangesize )
},{ },{
cFuncs = cFuncs ++ { this.string_( argName, completFunc ) }; cFuncs = cFuncs ++ { this.string_( argName ) };
}); });
} }
@ -244,7 +244,7 @@ ScelDocument : Document{
} }
string {arg rangestart, rangesize = 1; string {arg rangestart, rangesize = 1;
var cond; // var cond;
currentString = nil; currentString = nil;
thisdoc.string( rangestart, { |v| currentString = v }, rangesize ); thisdoc.string( rangestart, { |v| currentString = v }, rangesize );
// cond = Condition.new( { currentString.notNil } ); // cond = Condition.new( { currentString.notNil } );
@ -252,6 +252,17 @@ ScelDocument : Document{
// while ( { currentString.isNil }, {"wait for string".postln;} ); // while ( { currentString.isNil }, {"wait for string".postln;} );
^currentString; ^currentString;
} }
currentLine {
// var cond;
currentString = nil;
thisdoc.currentLine( { |v| currentString = v } );
// cond = Condition.new( { currentString.notNil } );
// cond.wait;
// while ( { currentString.isNil }, {"wait for string".postln;} );
^currentString;
}
text { text {
^this.string; ^this.string;
} }
@ -265,9 +276,6 @@ ScelDocument : Document{
} }
stringColor_ {arg color, rangeStart = -1, rangeSize = 0; stringColor_ {arg color, rangeStart = -1, rangeSize = 0;
} }
currentLine {
^""
}
prGetBounds { | bounds | ^bounds } prGetBounds { | bounds | ^bounds }
prSetBounds { } prSetBounds { }