Skip to content

tuareg-current-fun-name returns inaccurate results, breaking which-function-mode #306

@catern

Description

@catern

tuareg-current-fun-name is buggy:

let f = 1

gives me f.f.f

let f = 1

let g = 1

gives me f.f.g

There are various other bugs.

Since add-log-current-defun-function is set to tuareg-current-fun-name, which-function-mode displays ugly, wrong results.

As a result, I'm using the following configuration to disable the use of tuareg-current-fun-name:

(setq-local add-log-current-defun-function nil)
(setq-local add-log-current-defun-header-regexp (rx unmatchable))

which causes which-function-mode to fall back to using imenu, which for me is populated by merlin, and is much more accurate and nice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions