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

Use built-in line-number-at-pos in Emacs >= 28 #373

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renatofdds
Copy link
Contributor

No description provided.

@renatofdds
Copy link
Contributor Author

Ref: emacs-mirror/emacs@56e76f0

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change makes sense to me

@purcell
Copy link
Collaborator

purcell commented May 22, 2022

I'd be generally happy to merge this, but the docstring for the existing function is a bit confusing: "faster version of line-number-at-pos". AFAICT the linked commit renamed line-number-at-position to line-number-at-pos, but didn't make it faster. Its implementation always counts lines within the buffer, so I suspect it might still be slower than the approach taken in the existing function here, which "cheats" by using the caching in format-mode-line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants