branch: elpa/tuareg commit 8bf95cef4598f05582b94029a8f228d50e2d1dac Author: Christophe Troestler <christophe.troest...@umons.ac.be> Commit: Christophe Troestler <christophe.troest...@umons.ac.be>
mli generation: Be more subtle when extracting the signature --- tuareg.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tuareg.el b/tuareg.el index 39ebb6d..c945c43 100644 --- a/tuareg.el +++ b/tuareg.el @@ -77,6 +77,7 @@ (eval-when-compile (require 'cl-lib)) (require 'easymenu) (require 'find-file) +(require 'subr-x) (require 'caml-help nil t) (require 'caml-types nil t) (require 'tuareg-opam) @@ -2983,7 +2984,7 @@ or indent all lines in the current phrase." (if (cddr data) (setq sig (merlin--type-enclosing-text data)))))) (when (and sig (string-match "\\`sig\\>" sig) (>= (length sig) 9)) - (setq sig (substring sig 6 -3)) + (setq sig (string-trim (substring sig 3 -3))) (replace-regexp-in-string "\n " "\n" sig)))) (defun tuareg--ff-file-created-hook ()