Commit Graph

613 Commits

Author SHA1 Message Date
Bozhidar Batsov 8149df9132 Add a complication check GHA
It's based on Eldev.
2022-07-18 15:34:13 -05:00
Bozhidar Batsov 2a405226f2 Add commands to switch to and from a utop buffer
Those are extremely common in Emacs modes and allow people to
quickly jump to a REPL and back to the last source buffer they
were editing, while using the same keybinding.

I've modeled the implementation here after that of inf-clojure (a similar
mode written by me). I've also implemented a mode menu for
utop-minor-mode, so it's easier for the users to discover its
functionality.
2022-07-18 14:29:54 -05:00
Bozhidar Batsov 09d26a7509 Use defvar-local where appropriate 2022-07-18 10:04:04 -05:00
Bozhidar Batsov ba18d8ad38 Group the major mode code more tightly 2022-07-18 10:04:04 -05:00
Bozhidar Batsov 4673c07aa4 Improve the Emacs documentation 2022-07-18 10:04:04 -05:00
Bozhidar Batsov f91c126afb [Fix #389] Require Emacs 26 in utop.el 2022-07-18 10:04:04 -05:00
Bozhidar Batsov e7b1ff36d1 [Fix #358] Fix code completion for module identifiers in utop.el
Without those changes you won't get any completion for things like
"List.m". I'm not very familiar with the code, but it seems that the
backend returns the completion candidates without the module prefix
which caused the problem.

I've opted to fix this by handling prefixes with a "." in them specially
and this works fine in the limited testing I conducted locally.
2022-07-16 13:32:11 -05:00
Bozhidar Batsov 1a7c112a71 Add :safe properties to defcustoms 2022-07-16 11:32:15 -05:00
Bozhidar Batsov a84d499301 Remove redundant :group properties
Those are auto-inferred from the :prefix set in defgroup.
2022-07-16 11:32:15 -05:00
Bozhidar Batsov 2c08182649 Add some package description
package.el repos typically extract and show this info.
2022-07-16 11:32:15 -05:00
Bozhidar Batsov ec1f09420d Reformat a couple of let bindings
This makes it easier to see the definitions they introduce.
2022-07-16 11:32:15 -05:00
Bozhidar Batsov c117c6cf57 Use #' for function references where appropriate 2022-07-16 11:32:15 -05:00
Bozhidar Batsov dee6a8752a Use the kbd macro for all keybindings
This makes more complex keybindings easier to read and write.
2022-07-16 11:32:15 -05:00
Bozhidar Batsov b24f94243f Update a few URL references 2022-07-16 11:32:15 -05:00
Bozhidar Batsov 4be7bee6c1 Update CODEOWNERS
Seems the @diml user no longer exists and GH flagged this as an error.
2022-07-16 11:12:42 -05:00
Bozhidar Batsov a779b0515c Remove leftovers from Travis CI
These days utop is using GitHub Actions.
2022-07-15 17:48:45 +01:00
Etienne Millon e56a75d282 Prepare 2.10.0 2022-07-06 09:57:24 +02:00
Etienne Millon 8e748884ce
Merge pull request #384 from emillon/logs-lwt
Use logs.lwt instead of lwt_logs
2022-07-05 17:58:53 +02:00
Etienne Millon 6c55ea7996 Use logs.lwt instead of lwt_logs
The latter is deprecated and incompatible with OCaml 5.0.
2022-07-05 17:20:22 +02:00
Etienne Millon 2569162157 Compatibility with zed 3.2.0
This updates utop to use the uu packages instead of camomile, following
ocaml-community/zed#46 and ocaml-community/lambda-term#109.
2022-07-05 15:41:25 +01:00
Etienne Millon a0f19fd4da Doc: only mention dependencies in the opam file 2022-07-05 15:26:14 +01:00
Etienne Millon 511e713353
Merge pull request #379 from oemmerson/patch-1
Update README.md with correct filepath.
2022-06-20 10:34:37 +02:00
oemmerson 705986a866
Update readme with correct filepath.
Readme states 'Key bindings in the terminal can be changed by writing a ~/.lambda-term-inputrc file. For example:'

However, after writing this file and exiting utop after it's next restart generates the below warning:

`Warning: it is recommended to move `/home/owen/.lambda-term-inputrc` to `$XDG_CONFIG_HOME`, see:
http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html`
2022-06-19 17:51:50 +01:00
Kate cb7ecfc8bb Version 2.9.2 2022-06-15 16:23:41 +01:00
Kate ecda59a261
Merge pull request #377 from dra27/lib-layout
Support new Load_path.init API
2022-06-15 16:18:46 +01:00
David Allsopp fbbaec6be8 Support new Load_path.init API 2022-06-09 10:35:44 +01:00
David Allsopp 42614160c2 Adapt to new mechanism for loading topdirs.cmi 2022-04-16 10:36:40 -05:00
Kate 5d72a0ab34
Merge pull request #371 from favonia/ocaml5
Remove -safe-string for OCaml 5. See ocaml/ocaml#10893
2022-03-28 16:17:00 +01:00
favonia df448e9ccd Remove -safe-string for OCaml 5. See ocaml/ocaml#10893 2022-03-27 22:11:51 -05:00
Nymphium d5dbad6b80 Add build / develop environment in Nix 2022-02-06 13:01:58 -07:00
Etienne Millon 676e2cd654 Update changelog 2021-12-09 14:22:45 +01:00
Christian Lindig 137b50eee5 fixup! Document utop(1) options in manual page
Signed-off-by: Christian Lindig <lindig@gmail.com>
2021-12-02 17:47:48 -05:00
Christian Lindig c0054c41b2 Document utop(1) options in manual page
Add all options as decribed by the output by --help to the manual page.
This was done manually and some automation would be nicer.

Signed-off-by: Christian Lindig <christian.lindig@citrix.com>
2021-12-02 17:47:48 -05:00
Christian Lindig 3145c3f77d Update OPTIONS section in utop manual page
Point to utop --help for the list of options and explain --require in
particular.

Signed-off-by: Christian Lindig <christian.lindig@citrix.com>
2021-11-30 14:42:34 -05:00
Kate 560617c64f Add support for OCaml 4.14 2021-11-18 10:10:53 -05:00
Anil Madhavapeddy c87b8b2817 update CHANGES and fixes to opam file to pass lint 2021-06-18 09:31:46 +01:00
Rudi Grinberg bac3946079
Merge pull request #352 from chripell/fix-emacs-completion
Fix emacs completion returning bogus candidates.
2021-06-07 12:41:30 -07:00
Christian Pellegrin ec469bb839 Fix emacs completion returning bogus candidates.
In standalone mode, utop returns all the possible completions when no
one matches what the user has typed. This is surprising in emacs
because of the different UI/UX. For this reason, we keep a list of
prefixes for which completion has started and return only the
candidates which match the prefixes.

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
2021-06-07 12:40:48 -07:00
Rudi Grinberg 10502c50a0
Merge pull request #355 from kit-ty-kate/413
Update the OCaml 4.13 compatibility after the merge of ocaml/ocaml#10252
2021-06-02 12:59:42 -07:00
Kate 82fe82dad0 Update the OCaml 4.13 compatibility after the merge of ocaml/ocaml#10252 2021-06-02 19:20:59 +01:00
Rudi Grinberg 480c9f7a88
Merge pull request #353 from kit-ty-kate/413
Add support for OCaml 4.13
2021-05-25 14:00:59 -07:00
Kate 9fe8b5d838 Get rid of deprecated functions in OCaml 4.13 2021-05-25 21:00:33 +01:00
Kate 300dd7e562 Add support for OCaml 4.13 2021-05-25 20:24:59 +01:00
Rudi Grinberg 711c24661c
Merge pull request #338 from hyphenrf/patch-1 2021-04-08 08:00:44 -07:00
Rudi Grinberg c898602882
Merge pull request #350 from chripell/master
Fix color highlight for errors.
2021-04-07 19:41:16 -07:00
Christian Pellegrin 243f7a1536 Fix color highlight for errors.
The output from the compiler changed and now mentions the line number
(non only the charters, which actually becomes columns). This patch
introduces the idea of a range of lines spanned by an error and
correctly marks the faulty region.

I think a better solution would be to introduce a "point" record of
the form {line:int;column:int}. However, such a change would
reverberate through all the source code and so it is much more
invasive. I can prepare such a patch if desired, after this one, which
fixes the regression.
2021-04-05 08:56:50 +01:00
Rudi Grinberg 1660e5989a
Merge pull request #347 from dansanduleac/patch-1
Utop correctly restarts when (not utop-edit-command)
2021-04-03 20:18:13 -07:00
Rudi Grinberg b2f15bff67
Merge pull request #340 from leungbk/byte-comp
utop.el: Placate byte-compiler
2021-04-03 20:13:38 -07:00
Brian Leung e5059d2e2f utop.el: Fix utop-tuareg-next-phrase for newer tuareg.el
tuareg--after-double-colon no longer exists in the latest rev of
Tuareg, which has received 110 additional commits since the last
release version on OPAM, so inline the old definition, which was
removed in commit 91ba1d6143558092a3920e9b5c49755c0c86caed of Tuareg.

tuareg--skip-double-colon was renamed to
tuareg--skip-double-semicolon, and also received a slight change.
Inline that as well since it's a private function.
2021-04-03 21:24:20 -04:00
Florian Angeletti ac9c21cfcf exit with the right exit status
With OCaml 4.12.0 and later, the toplevel use the Compenv.Exit_with_status
exception to communicate when and with which status we should exit.
2021-04-03 14:38:14 -04:00