Skip to content

clojure-match-next-def doesn't support 0 arity top-level forms. #423

Closed
@emidln

Description

@emidln

Expected behavior

clojure-match-next-def shouldn't choke on this:

(def-shortcuts)

Actual behavior

(forward-sexp) is called [1] when the cursor position is (denoted by ^) (def-shortcuts^), and this causes the following error:

(scan-error "Containing expression ends prematurely" 9581 9582)

[1]

(forward-sexp)

Steps to reproduce the problem

Place your cursor at ^:

(def-shortcuts)^

invoke (clojure-match-next-def).

Environment & Version information

clojure-mode version information

clojure-mode (version 5.7.0-snapshot)

clojure-mode-20170120.2239

Emacs version

GNU Emacs 24.5.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.18.9)
$ rpm -qi emacs
Name        : emacs
Epoch       : 1
Version     : 24.5
Release     : 10.fc23
Architecture: x86_64
... <snip> ...
Signature   : RSA/SHA256, Tue 12 Apr 2016 09:13:13 PM CDT, Key ID 32474cf834ec9c
ba
Source RPM  : emacs-24.5-10.fc23.src.rpm
Build Date  : Mon 11 Apr 2016 06:21:33 AM CDT
... <snip> ...

Operating system

Fedora 23 (Linux)

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