diff --git a/emacs/merlin.el b/emacs/merlin.el index c15de68931..bd970b0b71 100644 --- a/emacs/merlin.el +++ b/emacs/merlin.el @@ -438,7 +438,9 @@ DATA must be an assoc list with fields line and col." (save-restriction (widen) (goto-char point) - (format "%d:%d" (line-number-at-pos) (current-column))))) + (format "%d:%d" (line-number-at-pos) + (- (position-bytes (point)) + (position-bytes (line-beginning-position))))))) (defun merlin--make-bounds (data) "From a remote merlin object DATA {\"start\": LOC1; \"end\": LOC2}, @@ -529,7 +531,7 @@ return (LOC1 . LOC2)." args)) ;; Log last commands (setq merlin-debug-last-commands - (cons (cons binary args) merlin-debug-last-commands)) + (cons (cons (cons binary args) nil) merlin-debug-last-commands)) (let ((cdr (nthcdr 5 merlin-debug-last-commands))) (when cdr (setcdr cdr nil))) ;; Call merlin process