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.el): Fix and improve Emacs bindings #309

Merged
merged 1 commit into from
Oct 2, 2023
Merged
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
3 changes: 2 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
unreleased
----------

* Add support for [opam-switch-mode](https://github.com/ProofGeneral/opam-switch-mode): enable the mode with <kbd>M-x opam-switch-mode</kbd> or add an automatic hook `(add-hook 'tuareg-mode-hook #'opam-switch-mode)`.
* Add support for [opam-switch-mode](https://github.com/ProofGeneral/opam-switch-mode): you can enable the mode with <kbd>M-x opam-switch-mode</kbd> or add an automatic hook `(add-hook 'tuareg-mode-hook #'opam-switch-mode)`.
* Fix keybindings to comply with [GNU Emacs' Key Binding Conventions](https://www.gnu.org/software/emacs/manual/html_node/elisp/Key-Binding-Conventions.html) (unbind <kbd>C-c ?</kbd> as <kbd>C-c `</kbd> is already set; unbind <kbd>C-c C-h</kbd> and bind <kbd>C-h .</kbd> instead). See also [this issue](https://github.com/ocaml/merlin/issues/1386#issuecomment-1701567716).

3.0.1 2022-09-29
----------------
Expand Down
4 changes: 1 addition & 3 deletions tuareg.el
Original file line number Diff line number Diff line change
Expand Up @@ -1506,7 +1506,6 @@ Run only once."
(define-key map "\C-c\C-i" #'tuareg-interrupt-ocaml)
(define-key map "\C-c\C-k" #'tuareg-kill-ocaml)
(define-key map "\C-c`" #'tuareg-interactive-next-error-source)
(define-key map "\C-c?" #'tuareg-interactive-next-error-source)
(define-key map "\C-c.c" #'tuareg-insert-class-form)
(define-key map "\C-c.b" #'tuareg-insert-begin-form)
(define-key map "\C-c.f" #'tuareg-insert-for-form)
Expand All @@ -1527,7 +1526,7 @@ Run only once."
(define-key map [?\C-c ?\C-i] #'ocaml-add-path)
(define-key map [?\C-c ?\[] #'ocaml-open-module)
(define-key map [?\C-c ?\]] #'ocaml-close-module)
(define-key map [?\C-c ?\C-h] #'caml-help)
(define-key map [?\C-h ?.] #'caml-help)
(define-key map [?\C-c ?\t] #'tuareg-complete))
map)
"Keymap used in Tuareg mode.")
Expand Down Expand Up @@ -3528,7 +3527,6 @@ OCaml uses exclusive end-columns but Emacs wants them to be inclusive."
(define-key map "\C-c\C-k" #'tuareg-kill-ocaml)
(define-key map "\C-c\C-z" #'tuareg-switch-to-recent-buffer)
(define-key map "\C-c`" #'tuareg-interactive-next-error-repl)
(define-key map "\C-c?" #'tuareg-interactive-next-error-repl)
(define-key map "\C-m" #'tuareg-interactive-send-input)
(define-key map [(shift return)]
#'tuareg-interactive-send-input-end-of-phrase)
Expand Down
Loading