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

beginning-of-defun and end-of-defun does not move point to start/end of function #79

Open
YongJieYongJie opened this issue Apr 14, 2023 · 0 comments · May be fixed by #80
Open

beginning-of-defun and end-of-defun does not move point to start/end of function #79

YongJieYongJie opened this issue Apr 14, 2023 · 0 comments · May be fixed by #80

Comments

@YongJieYongJie
Copy link

YongJieYongJie commented Apr 14, 2023

In other programming modes, beginning-of-defun and end-of-defun will move the point to the start of the nearest function, sexp, method, subroutine or other analogous constructs.

However, in kotlin-mode, beginning-of-defun moves the point to the beginning of the buffer.

Small example:

package com.example.myApp

class MyClass() {
    fun myFun1() {
        return "myFun1"
    }
    fun myFun2() {
        // when calling `beginning-of-defun` with the point anywhere in this function,
        // the point should move to the `fun` two lines above,
        // but it moves to the `package` at the beginning of the buffer instead.
        return "myFun2"
    }
}

Versions:

  • kotlin-mode version: 20230123.1859
  • emacs version: 29.0.60
  • OS: macOS Ventura 13.3 on M1 Pro

(in any case, thanks for the amazing work on this, or otherwise I would not have been able to use Emacs for my Kotlin-related work 👍 )

@granddaifuku granddaifuku linked a pull request Jul 15, 2023 that will close this issue
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 a pull request may close this issue.

1 participant