Commit graph

130 commits

Author SHA1 Message Date
59d5bdc8ca
ignore .dir-locals.el in cmake build 2022-08-19 13:31:57 +02:00
875d328c18
correct load-path for cmake build 2022-08-19 13:14:17 +02:00
e97fd18d31
ignore .dir-locals.el in cmake build 2022-08-18 13:30:23 +02:00
5a5ff2b2b6
add local load-path to cmake build 2022-08-17 09:19:50 +02:00
53d3959e1b changes for MELPA compatibility 2022-08-02 12:48:02 +02:00
36eae66a3c MELPA CI checks 2022-08-02 12:34:51 +02:00
Marcin Pączkowski
d8296a9af5
Merge pull request #39 from jxa/packaging
Allow installation via package managers
2021-09-04 09:44:53 -07:00
Marcin Pączkowski
35b972f1a7
Update README.md 2021-09-04 09:41:16 -07:00
Marcin Pączkowski
057a1b30f2
Update README.md 2021-09-04 09:39:05 -07:00
John Andrews
cbd89755e8 README clarifications
Also, autoload `sclang-customize`, as that should be able to be called
interactively regardless of whether sclang is started
2021-09-04 09:46:59 -04:00
John Andrews
4852752d67 Add a test for the autoloading behavior 2021-08-19 21:23:54 -04:00
John Andrews
4e1c886b98 Move files back under /sc 2021-08-19 20:54:46 -04:00
John Andrews
fcfa17b6be Update readme 2021-08-19 20:53:11 -04: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
19dfecc8ca Revert "Combine sclang-mode into the main sclang file"
This reverts commit c414b9c7ab.
2021-08-16 19:57:43 -04:00
John Andrews
daeb0106c5 Feedback from PR 2021-08-15 20:20:18 -04:00
John Andrews
5ac5150397 Rename sc directory so it only loads when calling from emacs 2021-08-15 16:29:46 -04:00
John Andrews
cf3e692bb5 Update installation docs 2021-08-10 21:04:10 -04:00
John Andrews
c414b9c7ab Combine sclang-mode into the main sclang file
Because the only autoloaded function is sclang-mode, the sclang file was
not being evaluated. This made it impossible to use-package properly in
order to configure the package. Combining the files makes the most sense
as sclang.el wasn't doing much anyways.
2021-08-09 22:34:47 -04:00
John Andrews
bc06627f24 Enable github CI workflow 2021-08-09 16:07:01 -04:00
John Andrews
9b160ec102 Fix the load issue by unwrapping requires 2021-08-09 12:05:52 -04:00
John Andrews
14157663b0 Add test to expose a load-time issue
The issue manifests when sclang is compiled. Steps to reproduce in real
emacs config:
1. Install the package and compile it
2. Open a file with a `.sc` or `.scd` extension
3. Witness the error `(void-function sclang-make-buffer-name)`

Steps to reproduce with the test:
0. install [eldev](https://github.com/doublep/eldev#installation)
1. `eldev compile`
2. `eldev test`
2021-08-09 11:57:27 -04:00
John Andrews
225e810bdd Add quark file 2021-07-25 19:54:35 -04:00
John Andrews
6cea8929e6 Conditionally respect sclang-vars
Only when compiling with cmake will sclang-vars.el be written. This
commit moves relevant constants into customizable vars. Only if the
`sclang-system-data-dir` exists is it respected, otherwise it will guess
the proper location by looking at the system-type.

The purpose of this is to make it possible to build and distribute a
package independent of the SuperCollider build process, while ensuring
that those users who have become accustomed to the current install
process are not disrupted.
2021-07-25 19:54:19 -04:00
Mario Lang
9d6067b2e5
Merge pull request #26 from supercollider/topic/ninja
cmake: fix ninja toolchain
2021-07-23 09:19:34 +02:00
Brian Heim
a85032e5fb cmake: fix ninja toolchain
When CMake is run with ninja as the generator, duplicate target names
are generated that cause configuration to fail. This commit fixes that
by adding a "compile_" prefix to each of the byte-compiled target names,
eliminating the naming collision.
2020-04-10 14:17:59 -05:00
Brian Heim
0e95a1884d
Merge pull request #25 from mlang/emacs25
Use `cl-gensym' to fix Emacs 25 compatibility (Fixes #24)
2020-04-02 09:05:01 -05:00
Mario Lang
6739aa327c Use `cl-gensym' to fix Emacs 25 compatibility (Fixes #24)
`gensym' used to be an alias for `cl-gensym'.
It was replaced with a "native" implementation in subr.el with Emacs 26.1.
Go back to using `cl-gensym' to make sure Emacs 25 still works.
2020-04-02 08:29:01 +02:00
TatriX
2de9ec1157 Update changelog 2020-03-25 23:16:01 +01:00
TatriX
8472f03dbf Use define-derived-mode from prog-mode and update auto-mode-alist 2020-03-25 23:14:32 +01:00
TatriX
7bfbd1929d scel: Add support for completion-at-point-functions and company-mode 2020-02-26 17:10:07 +01:00
Brian Heim
7b5d954003
Merge pull request #19 from mlang/cl
Fix a number of overlooked obsolete aliases
2019-12-28 18:25:06 -06: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
Brian Heim
4ef3185647
Merge pull request #18 from mlang/cl
Use cl-lib instead of obsolete cl package
2019-12-25 08:33:44 -06:00
Mario Lang
bb6bce1671 Use cl-lib instead of obsolete cl package
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)
2019-12-25 14:14:13 +01:00
Brian Heim
b6e5d1bf78
Merge pull request #17 from mlang/sclang-make-options
Fix `sclang-make-options' falsely emitting -d and -l
2019-12-24 16:47:29 -06: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
Brian Heim
6b63bf1bcf
Merge pull request #15 from mlang/HelpSource
Create a HelpSource directory and document the EmacsBuffer class
2019-12-22 16:35:25 -06:00
Mario Lang
0543729ec5 Fix typo 2019-12-22 23:31:55 +01:00
Brian Heim
92d549770b
Merge pull request #16 from mlang/multibyte
Fix decoding of evaluation results to support multibyte characters
2019-12-22 16:01:50 -06: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
Mario Lang
406cfde4c5 Create a HelpSource directory and document the EmacsBuffer class 2019-12-15 19:51:40 +01:00
Brian Heim
da28459931
Merge pull request #14 from mlang/SCDocNode.storeLispOn
Allow serialisation of SCDocNode trees to Emacs Lisp
2019-12-15 10:04:26 -06:00
Mario Lang
6c74020a10 Allow serialisation of SCDocNode trees to Emacs Lisp 2019-12-15 08:02:03 +01:00
Brian Heim
857fcf763c
Merge pull request #13 from mlang/email
Update my email address
2019-12-14 09:50:27 -06:00
Mario Lang
7fbce73e7f Update my email address 2019-12-12 10:37:11 +01:00
Brian Heim
d0b42dd183
Merge pull request #11 from larme/fix-readme
update configuration file path in readme for macOS
2019-09-25 22:42:28 -05:00
Zhao Shenyang
223a53c29a update configuration file path in readme for macOS 2019-09-18 12:36:56 +08:00
Brian Heim
7ec76e4c02
Merge pull request #9 from widp/flet-macro-change
change instances of flet to cl-flet as flet is obsolete
2018-08-02 20:46:51 -05:00
widp
95120e310b change instances of flet to cl-flet as flet is obsolete 2018-07-28 20:01:58 +05:30