Skip to content

Commit

Permalink
Merge pull request #309 from erikmd/fix-bindings
Browse files Browse the repository at this point in the history
fix(tuareg.el): Fix and improve Emacs bindings
  • Loading branch information
monnier authored Oct 2, 2023
2 parents 301c80b + df9495d commit f03eb1c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
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

0 comments on commit f03eb1c

Please sign in to comment.