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.
This is actually pretty boring. It replaces calls to obsolete aliases
with the properly namespaced functions from the cl-lib package.
This raises our minimal Emacs version requirement to 24.3 (2013-03-10).
However, people using earlier versions can install the cl-lib package
from the Emacs package system.
While at it:
* remove function `sclang-document-list' which was really useless.
* fix `sclang-format-pseq' which needed to use `cl-labels'
instead of `cl-flet' to actually work.
* (cl-reduce (lambda (a b) (or a b)) (mapcar function list))
is much better written as (and now properly short-circuits):
(cl-some function list)
* (cl-remove-if 'null list)
should be written as
(remq nil list)
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).
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.
What I've done to fix this:
- add a sclang-class-list variable in sclang-language.el, which is a
list of all the classes known to sclang. this is populated when
sclang starts.
- update sclang-font-lock-class-keyword-matcher in
sclang-mode.el. since the sclang-class-name-regexp now will match
all words that start with a capital letter (see next bullet point
for that change), this function had to be updated to check to make
sure that the word starting with a capital letter is in the list of
classes. if it is, then we know it's a class and it gets
highlighted. if it's not, then it's just something the user typed
with a capital letter, so we don't highlight it.
- update sclang-update-font-lock in sclang-mode.el. instead of
generating a huge regexp from a list of all the classes in
SuperCollider, just run the normal fontification from that
function. this avoids making the regexp too big and thus prevents
fontification from failing.
`(force-mode-line-update)` updates only the mode-line of the current buffers. Providing a non-nil argument updates the mode-line of all buffers. This is particularly useful when having a split view with the server buffer and another buffer where current buffer is not the server buffer. (probably a very common use case).
This library is part of Emacs. Bundling it in the same directory as
the sclang*.el libraries will put it on the load-path. The bundled
version then shadows the newer version which is part of Emacs, which
can cause hard to detect problems.
this patch introduces two new key bindings:
C-c C-y: open help browser via Help.gui
C-c h: open help browser for a specific topic
the old help browser is still available via C-c C-h and can be used to
display pre-rendered help files.
Signed-off-by: Tim Blechmann <tim@klingt.org>
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.
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>
this patch implements a cmake-based build system for supercollider. it
currently builds:
- sclang and scsynth on linux
- plugins on linux and osx
- scel
Signed-off-by: Tim Blechmann <tim@klingt.org>
git-svn-id: https://supercollider.svn.sourceforge.net/svnroot/supercollider/trunk@10240 a380766d-ff14-0410-b294-a243070f3f08