Commit graph

19 commits

Author SHA1 Message Date
53d3959e1b changes for MELPA compatibility 2022-08-02 12:48:02 +02:00
John Andrews
8503b2a3e2 Better autoloads
Add autoloads which will cause whole sclang package to be loaded.
2021-08-19 13:26:51 -04:00
John Andrews
9b160ec102 Fix the load issue by unwrapping requires 2021-08-09 12:05:52 -04:00
Mario Lang
e43da1aa99 Fix a number of overlooked obsolete aliases
For some reason, these slipped my attention.  Sorry about that.
Also:
* `nconc' is more efficient then `append' if destructive modification is not
  an issue.
* Emacs 26 actually deprecated `string-as-multibyte' in favour of
  `decode-coding-string' since the latter actually forces the user to
  specify an encoding.
2019-12-26 11:12:53 +01:00
Mario Lang
59e0d31b0a Fix `sclang-make-options' falsely emitting -d and -l
It turns out `file-directory-p' and `file-exists-p' return t when passed
the empty string.  This is sort of unexpected, and leads to the logic
in `sclang-make-options' choosing to pass -d and -l with
unpredictable values (default-directory) to sclang.
A default of "" (or -1) is pretty unidiomatic for elisp, so we change
the default of user option `sclang-runtime-directory',
`sclang-library-configuration-file' and `sclang-udp-port' to
nil, and adjust `sclang-make-options' accordingly.  While we're here,
we can eliminate the use of `cl-flet'.
Additionally, `sclang-eval-sync' uses `find' which is really an
alias for `cl-find' which and can be replaced with a call to the built-in
function `assoc'.  This is faster, and the last dependency on the
cl package, which we can now remove (obsolete since emacs 27).
2019-12-24 23:18:08 +01:00
Mario Lang
7285fb3358 Fix decoding of evaluation results to support multibyte characters
Symptom: (sclang-eval-sync "\"ö\"") evaluates to "ö"
After this patch: (sclang-eval-sync "\"ö\"") => "ö"

This was tricky to figure out, so here is a bit of background.
scel uses a so-called command FIFO to send (amongst other things) evaluation
results to Emacs.  This FIFO uses a pascal-string (32bit string length
followed by character data) to send Lisp to Emacs.  The command process
coding system is already set to 'no-conversion on the Emacs side
to avoid crippling the int32 at the beginning of every string.
However, the read-from-string call in sclang-command-process-filter
implicitly converts the unibyte string received from the process to
a multibyte string, without doing proper conversion.
The right function to use here is string-as-multibyte, which does
the correct conversion.
2019-12-17 08:32:05 +01:00
widp
95120e310b change instances of flet to cl-flet as flet is obsolete 2018-07-28 20:01:58 +05:30
Tim Blechmann
1569625efa 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>
2011-12-08 19:46:51 +01:00
Jakob Leben
65b6928a97 scel: keep command fifo alive for the lifetime of sclang
When sclang recompiled the class library, it would close its writing
end of the fifo, which in turn would trigger fifo deletion in scel.

This starts a dummy cat process with output redirected to the fifo,
so as to keep the fifo open as long as we desire.
2011-09-25 18:23:29 +02:00
Tim Blechmann
d91e92f53f scel: shutdown library before class library recompilation
Signed-off-by: Tim Blechmann <tim@klingt.org>
2011-09-20 14:44:37 +02:00
Tim Blechmann
5aa9b34534 scel: work around some warnings and avoid some deprecated functions
Signed-off-by: Tim Blechmann <tim@klingt.org>
2011-07-19 12:32:48 +02:00
Tim Blechmann
6726ce6618 scel: use in-process library recompilation
scel is modified to support in-process library recompilation. the key
binding has slightly been changed:
C-c C-l - recompile the library
C-c C-o - restart the interpreter

Signed-off-by: Tim Blechmann <tim@klingt.org>
2011-06-27 21:50:03 +02:00
Stuart Popejoy
d46a9661ab modified sclang-eval-document to save-excursion to avoid clobbering point 2011-06-09 18:28:07 +02:00
andersvi
a6eaaa5857 adjusting buffer-showing to version of display-buffer in emacs 23.
Setting split-width-threshold to nil inhibits horizontal splitting and
gets you the behavior of Emacs 22 in this respect.


git-svn-id: https://supercollider.svn.sourceforge.net/svnroot/supercollider/trunk@10274 a380766d-ff14-0410-b294-a243070f3f08
2010-08-28 13:00:25 +00:00
Tim Blechmann
d1639c1cbb remove trailing whitespaces
git-svn-id: https://supercollider.svn.sourceforge.net/svnroot/supercollider/trunk@9417 a380766d-ff14-0410-b294-a243070f3f08
2009-09-26 06:17:48 +00:00
Marije Baalman
4bff94c0cc committed ide platform switch for emacs/scel, and added the evaluate document shortcut
git-svn-id: https://supercollider.svn.sourceforge.net/svnroot/supercollider/trunk@9398 a380766d-ff14-0410-b294-a243070f3f08
2009-09-12 15:11:18 +00:00
andersvi
b205ca9ca3 Fixed errors when hitting 'emacs -sclang' etc. with later emacsen.
Updated switches to include hyphen.  These switches seem to work with
v.22 (possibly because the get treated as longopts?)


git-svn-id: https://supercollider.svn.sourceforge.net/svnroot/supercollider/trunk@9388 a380766d-ff14-0410-b294-a243070f3f08
2009-09-09 12:02:59 +00:00
Dan Stowell
6be16de284 Update address of Free Software Foundation (debian source-checking tools produce warnings about this).
Also putting slightly more explicit copyright attribution in some files (for similar reason).


git-svn-id: https://supercollider.svn.sourceforge.net/svnroot/supercollider/trunk@9082 a380766d-ff14-0410-b294-a243070f3f08
2009-04-20 08:38:27 +00:00
Marije Baalman
89fba7d169 move scel to editors
git-svn-id: https://supercollider.svn.sourceforge.net/svnroot/supercollider/trunk@8370 a380766d-ff14-0410-b294-a243070f3f08
2009-01-02 19:06:25 +00:00