editors: scel - move code from el to sc to avoid method overwrite

we can simply call the library shutdown handler from within emacs to avoid
a method overwrite.

Signed-off-by: Tim Blechmann <tim@klingt.org>
This commit is contained in:
Tim Blechmann 2011-12-07 00:00:16 +01:00
parent 08cbc64f3a
commit 1569625efa
3 changed files with 6 additions and 18 deletions

View file

@ -230,10 +230,10 @@ If EOB-P is non-nil, positions cursor at end of buffer."
(sclang-message "Initializing library...done"))
(defun sclang-on-library-shutdown ()
(when sclang-library-initialized-p
(run-hooks 'sclang-library-shutdown-hook)
(setq sclang-library-initialized-p nil)
(sclang-message "Shutting down library...")
)
(sclang-message "Shutting down library...")))
;; =====================================================================
;; process hooks
@ -311,6 +311,7 @@ If EOB-P is non-nil, positions cursor at end of buffer."
"Start SuperCollider process."
(interactive)
(sclang-stop)
(sclang-on-library-shutdown)
(sit-for 1)
(sclang-init-post-buffer)
(sclang-start-command-process)
@ -349,7 +350,6 @@ If EOB-P is non-nil, positions cursor at end of buffer."
"Recompile class library."
(interactive)
(when (sclang-get-process)
(sclang-on-library-shutdown)
(process-send-string sclang-process "\x18")
))

View file

@ -251,6 +251,7 @@ Emacs {
outStream = CollStream.on(String.new);
outFile = File(outFileName, "w");
ShutDown.add {
Emacs.evalLispExpression( "(sclang-on-library-shutdown)" );
if (outFile.notNil) {
outFile.close;
outFile = nil

View file

@ -1,13 +0,0 @@
+ LinuxPlatform {
recompile {
if ( this.hasFeature( \emacs ) ) {
Emacs.evalLispExpression( "(sclang-recompile)" )
} {
this.prRecompile
}
}
prRecompile {
_Recompile
}
}