Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: tuareg: use #'; don't mark (tuareg-opam-update-env) as obsolete & docs: Update README.md #308

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,16 @@ location of an identifier with <kbd>C-cC-l</kbd>, to go to the next
(resp. previous) phrase with <kbd>C-cC-n</kbd>
(resp. <kbd>C-cC-p</kbd>),... Highly recommended.

### opam-switch-mode

If you happen to work with several switches, it is recommended to install
[opam-switch-mode][] (available in [NonGNU ELPA][] and [MELPA][]).
This minor mode defines a command <kbd>M-x opam-switch-set-switch</kbd>
as well as a menu-bar and a mode-bar menu "OPSW",
to easily select another OPAM switch. Upon such a change, a hook kills
the running OCaml toplevel, if any, so that the next eval command
is run using the OCaml toplevel from the new switch.

### Caml mode

[caml-mode][] (available in [NonGNU ELPA][] and [MELPA][]) is used to
Expand All @@ -252,6 +262,7 @@ the obsolete `*.annot` files), open a module for documentation,...
[caml-mode]: https://github.com/ocaml/caml-mode
[NonGNU ELPA]: https://elpa.nongnu.org/
[MELPA]: https://melpa.org/
[opam-switch-mode]: https://github.com/ProofGeneral/opam-switch-mode


Reporting
Expand Down
1 change: 0 additions & 1 deletion tuareg-opam.el
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,6 @@ Delegate the task to `opam-switch-set-switch' if the minor mode
`opam-switch-mode' (https://github.com/ProofGeneral/opam-switch-mode)
is installed. This ELPA package also provides a menu-bar and a
mode-bar menu `\"OPSW\"'."
(declare (obsolete opam-switch-set-switch "2023-07"))
(interactive
(let* ((compl (tuareg-opam-installed-compilers))
(current (tuareg-opam-current-compiler))
Expand Down
2 changes: 1 addition & 1 deletion tuareg.el
Original file line number Diff line number Diff line change
Expand Up @@ -1495,7 +1495,7 @@ Run only once."
(define-key map "\C-c\C-c" #'compile)
(define-key map "\C-c\C-w" (if (fboundp 'opam-switch-set-switch)
#'opam-switch-set-switch
'tuareg-opam-update-env))
#'tuareg-opam-update-env))
(define-key map "\M-\C-x" #'tuareg-eval-phrase)
(define-key map "\C-x\C-e" #'tuareg-eval-phrase)
(define-key map "\C-c\C-e" #'tuareg-eval-phrase)
Expand Down