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

end-of-defun skips two top level forms #485

Closed
mnewt opened this issue Aug 21, 2018 · 5 comments
Closed

end-of-defun skips two top level forms #485

mnewt opened this issue Aug 21, 2018 · 5 comments

Comments

@mnewt
Copy link

mnewt commented Aug 21, 2018

I think this is a pretty recent regression, maybe the last week or two.

Expected behavior

end-of-defun skips one top level form at a time.

Steps

"|" is point

(defn one)
|
(defn two)

(defn three)

M-x end-of-defun

(defn one)

(defn two)
|
(defn three)

Actual behavior

end-of-defun skips two top level forms.

Steps to reproduce the problem

"|" is point

(defn one)
|
(defn two)

(defn three)

M-x end-of-defun

(defn one)

(defn two)

(defn three)
|

Environment & Version information

clojure-mode version information

I pulled the latest from master (e6bd584).

clojure-mode (version 5.8.2)

Emacs version

M-x emacs-version
GNU Emacs 27.0.50 (build 1, x86_64-apple-darwin17.7.0, NS appkit-1561.60 Version 10.13.6 (Build 17G65))
 of 2018-08-19

Operating system

macOS 10.13.6

> uname -a
Darwin host 17.7.0 Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64 i386 MacBookPro14,3 Darwin
@bbatsov
Copy link
Member

bbatsov commented Aug 21, 2018

It's probably some regression from the changes @dpsutton did recently in #484.

@dpsutton
Copy link
Contributor

Most likely. I can look at this tomorrow night. Sorry about that. I can imagine it is incredibly frustrating. I am experiencing this as well. I never use end-of-defun but beginning-of-defun followed by paredit-forward so i never noticed it.

@bbatsov
Copy link
Member

bbatsov commented Aug 21, 2018

Yeah, I didn't pay much attention to this in the PR, but we need a matching version of end-of-defun that's comment-aware.

@dpsutton
Copy link
Contributor

makes sense. I looked into end-of-defun and I thought it just relied on beginning-of-defun and the matching paren is why I didn't go into it more.

@bbatsov
Copy link
Member

bbatsov commented Aug 27, 2018

Fixed in #487

@bbatsov bbatsov closed this as completed Aug 27, 2018
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

No branches or pull requests

3 participants