{"action":"opened","issue":{"url":"https://api.github.com/repos/clojure-emacs/clojure-mode/issues/423","repository_url":"https://api.github.com/repos/clojure-emacs/clojure-mode","labels_url":"https://api.github.com/repos/clojure-emacs/clojure-mode/issues/423/labels{/name}","comments_url":"https://api.github.com/repos/clojure-emacs/clojure-mode/issues/423/comments","events_url":"https://api.github.com/repos/clojure-emacs/clojure-mode/issues/423/events","html_url":"https://github.com/clojure-emacs/clojure-mode/issues/423","id":203432861,"number":423,"title":"`clojure-match-next-def` doesn't support 0 arity top-level forms.","user":{"login":"emidln","id":519370,"avatar_url":"https://avatars.githubusercontent.com/u/519370?v=3","gravatar_id":"","url":"https://api.github.com/users/emidln","html_url":"https://github.com/emidln","followers_url":"https://api.github.com/users/emidln/followers","following_url":"https://api.github.com/users/emidln/following{/other_user}","gists_url":"https://api.github.com/users/emidln/gists{/gist_id}","starred_url":"https://api.github.com/users/emidln/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emidln/subscriptions","organizations_url":"https://api.github.com/users/emidln/orgs","repos_url":"https://api.github.com/users/emidln/repos","events_url":"https://api.github.com/users/emidln/events{/privacy}","received_events_url":"https://api.github.com/users/emidln/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-01-26T17:20:52Z","updated_at":"2017-01-26T17:20:52Z","closed_at":null,"body":"hmm, it seems `clojure-match-next-def` doesn't support top-level forms without an argument (i.e. a macro that imports or defines things such as `(def-shortcuts)`)\r\n`forward-sexp` blows up at line 668 of `clojure-mode.el`\r\nSeems that returning nil ala\r\n``````\r\n\r\n## Expected behavior\r\n\r\n`clojure-match-next-def` shouldn't choke on this:\r\n\r\n```clj\r\n(def-shortcuts)\r\n```\r\n\r\n## Actual behavior\r\n\r\n`(forward-sexp)` is called [1]  when the cursor position is (denoted by `^`) `(def-shortcuts^)`, and this causes the following error:\r\n\r\n```\r\n(scan-error \"Containing expression ends prematurely\" 9581 9582)\r\n```\r\n\r\n[1] https://github.com/clojure-emacs/clojure-mode/blob/0113aa969e09e31d65717d4a9c16c934c77dcb9b/clojure-mode.el#L667\r\n\r\n## Steps to reproduce the problem\r\n\r\nPlace your cursor at `^`:\r\n\r\n```clj\r\n(def-shortcuts)^\r\n```\r\ninvoke `(clojure-match-next-def)`. \r\n\r\n## Environment & Version information\r\n\r\n### clojure-mode version information\r\n\r\n```\r\nclojure-mode (version 5.7.0-snapshot)\r\n```\r\n\r\n```clojure-mode-20170120.2239```\r\n\r\n### Emacs version\r\n\r\n```\r\nGNU Emacs 24.5.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.18.9)\r\n```\r\n\r\n```\r\n$ rpm -qi emacs\r\nName        : emacs\r\nEpoch       : 1\r\nVersion     : 24.5\r\nRelease     : 10.fc23\r\nArchitecture: x86_64\r\n... <snip> ...\r\nSignature   : RSA/SHA256, Tue 12 Apr 2016 09:13:13 PM CDT, Key ID 32474cf834ec9c\r\nba\r\nSource RPM  : emacs-24.5-10.fc23.src.rpm\r\nBuild Date  : Mon 11 Apr 2016 06:21:33 AM CDT\r\n... <snip> ...\r\n```\r\n\r\n### Operating system\r\n\r\n`Fedora 23 (Linux)`"}}
{"actor":{"display_login":"emidln"}}